Forum: MySQL 5 Days Ago |
| Replies: 5 Views: 338 It will be look like
$sql = "UPDATE inventory WHERE userID = '$_SESSION[userID]' SET money = money+ $ssmoney "; |
Forum: MySQL 11 Days Ago |
| Replies: 1 Views: 435 First create a database named forum by executing the following command on mysql prompt
CREATE DATABASE forum; |
Forum: MySQL Nov 9th, 2009 |
| Replies: 4 Views: 461 wamp supports MySQL. MySQL does not store databases with .db extentsion. You can find all databases under data directory i.e.
c:\wamp\bin\mysql\mysql5.x.x\data\
I assumed you have installed wamp... |
Forum: MySQL Nov 9th, 2009 |
| Replies: 4 Views: 441 Sorry for that, I didn't realize that you are using Windows. You should use 'c:\mysql\data.txt' instead of the path I mentioned. |
Forum: MySQL Nov 9th, 2009 |
| Replies: 4 Views: 441 Mention the full path to the destination where you mention the file name e.g.
SELECT col1, col2 INTO OUTFILE 'c:\mysql\data.txt'
FIELDS TERMINATED BY ','
.... |
Forum: MySQL Oct 25th, 2009 |
| Replies: 3 Views: 418 Use \ before any special character. If you using PHP, then use mysql_real_escape_string() (http://php.net/mysql_real_escape_string) function. |
Forum: MySQL Apr 11th, 2009 |
| Replies: 2 Views: 930 What is the collation of $lookby? Did you alter table structure or upgraded MySQL? |
Forum: MySQL Apr 11th, 2009 |
| Replies: 2 Views: 754 You need to use LIMIT (http://dev.mysql.com/doc/refman/5.1/en/select.html)
$sql = 'SELECT * FROM Possesions ORDER BY quantity DESC LIMIT 0,10'; |
Forum: MySQL Apr 4th, 2009 |
| Replies: 6 Views: 690 |
Forum: MySQL Apr 4th, 2009 |
| Replies: 2 Views: 1,479 Import .sql to MySQL and then export it via any GUI tool (http://www.mwasif.com/2008/6/mysql-gui-tools/) or export as CSV with a simple PHP script... |
Forum: MySQL Jan 19th, 2009 |
| Replies: 1 Views: 1,029 MySQL query will look like
UPDATE table_name SET
view = view+1
WHERE vidid='yt_xE0wOa5R6KY' |
Forum: MySQL Jan 19th, 2009 |
| Replies: 2 Views: 635 You have comma at the end of the statement, statement should end with a semicolon not comma. |
Forum: MySQL Jan 12th, 2009 |
| Replies: 5 Views: 3,403 Hello mayfieldjr,
Here is a sample code to get the SUM of all INT fields in a specific table. You must have at least MySQL 5.0 to run this query.
SET @qry = (SELECT CONCAT('SELECT... |
Forum: MySQL Jan 8th, 2009 |
| Replies: 5 Views: 3,403 I think you can achive this by using INFORMATION_SCHEMA (http://dev.mysql.com/doc/refman/5.0/en/information-schema.html) tables. |
Forum: MySQL Dec 18th, 2008 |
| Replies: 4 Views: 762 Use mysql_real_escape_string() (http://www.php.net/mysql_real_escape_string).
$query = "insert into lydia(id,resume) values('$ids','".mysql_real_escape_string($i)."')"; |
Forum: MySQL Aug 20th, 2008 |
| Replies: 2 Views: 629 In which database you create the table and this error disappears? |
Forum: MySQL Jul 7th, 2008 |
| Replies: 4 Views: 922 Why do you want to insert data to three tables in a single query? |
Forum: MySQL Jul 7th, 2008 |
| Replies: 1 Views: 530 Which server will bear the most of the load? You must be aware of the fact that all INSERT, UPDATE, DELETE etc queries should go to master server. But you can SELECT from either of the 2 servers.
... |
Forum: MySQL Jun 1st, 2008 |
| Replies: 3 Views: 1,562 On windows my.ini and on Linux my.cnf |
Forum: MySQL May 29th, 2008 |
| Replies: 3 Views: 1,562 Variables are defined in option file (http://dev.mysql.com/doc/refman/5.0/en/option-files.html). |
Forum: MySQL May 27th, 2008 |
| Replies: 6 Views: 6,092 If the data type is datetime, then you must include time in the query
SELECT * FROM table where date_col BETWEEN '2008-10-01 00-00-00' AND '2008-12-12 23:59:59' |
Forum: PHP May 25th, 2008 |
| Replies: 4 Views: 504 It is possible to use mail functionality on your computer. You just need a mail server installed on your PC. You can use the free version of LiteMail (http://www.cmfperception.com/litemail.html). |
Forum: PHP May 25th, 2008 |
| Replies: 2 Views: 9,529 all is a reserve word. It is not a good practive to use reserve words in query. If it is required to use such words, then simply use back ticks (`) around them as I did in the below query.... |
Forum: MySQL May 24th, 2008 |
| Replies: 4 Views: 1,044 what is the error message? |
Forum: MySQL May 16th, 2008 |
| Replies: 3 Views: 645 Did you echo the query? You might be missing values for $c/$d. |
Forum: MySQL May 8th, 2008 |
| Replies: 10 Views: 2,768 You were trying to run multiple sql statements with a single mysql_query() call which is not supported. If you need to run multiple queries in a single call, then consider the use of... |
Forum: MySQL May 7th, 2008 |
| Replies: 10 Views: 2,768 Write statements without aliase e.g.
DELETE FROM images WHERE image_id = 803 AND plant_num = 2277 LIMIT 1; |
Forum: MySQL Apr 13th, 2008 |
| Replies: 1 Views: 4,143 SET @a = 'table';
SET @x := CONCAT('SELECT * FROM ', CONCAT(@a, '_', 'name'));
Prepare stmt FROM @x;
Execute stmt;
is same as
SELECT * FROM table_name; |
Forum: MySQL Mar 29th, 2008 |
| Replies: 2 Views: 629 In PhpMyAdmin on selecting a table from left frame you will see the related options in right side of the page. Select the option Import and provide the CSV file path. Then select CSV and the related... |
Forum: MySQL Mar 14th, 2008 |
| Replies: 19 Views: 2,003 trudge is right. Actualy your MySQL is running in strict mode. Either resolve the issues which trudge has mentioned or change sql-mode.
To change sql-mode, either change the value of sql_mode to... |
Forum: MySQL Mar 9th, 2008 |
| Replies: 19 Views: 2,003 Did you execute these commands in phpmyadmin? |
Forum: MySQL Mar 9th, 2008 |
| Replies: 19 Views: 2,003 It seems to be a MySQL bug like this http://bugs.mysql.com/bug.php?id=9029.
Do you have latest MySQL version?
Also try source (http://dev.mysql.com/doc/refman/5.0/en/batch-commands.html)... |
Forum: MySQL Mar 9th, 2008 |
| Replies: 19 Views: 2,003 Kindly replace MYSQL-USERNAME with root. |
Forum: MySQL Mar 8th, 2008 |
| Replies: 19 Views: 2,003 The command will be
mysql databasename < echeck.sql -uMYSQL-USERNAME -p |
Forum: MySQL Mar 8th, 2008 |
| Replies: 19 Views: 2,003 It looks like a bug. Here is a bug report (http://bugs.mysql.com/bug.php?id=9029).
What is your MySQL version?
You can also use command line utility (http://dev.mysql.com/doc/en/mysqldump.html). |
Forum: MySQL Mar 2nd, 2008 |
| Replies: 2 Views: 1,590 You can also use HeidiSQL (http://www.heidisql.com/) and it is free. |