![]() |
| mysql multiple row update |
|
jwwebs
|
I am trying to update multiple records,rows,fields in a table. Below is what I am placing in the sql fild in phpmyadmin. It works with one update line but not more. What am I missing here? Doesn't the semicolon end the line and run the next. I don't have a clue and can't find any info online.
UPDATE Products SET TitleTag='U.S. Air Force Retired Shop On-Line for Flags of the world - US, International Flags ' Where Product_ID=28; UPDATE Products SET TitleTag='Vietnam Veterans of America Shop On-Line for Flags of the world - US, International Flags ' Where Product_ID=29; Thanks for the help Bob |
||||||||||||
|
|
|||||||||||||
|
nathacof
Forum Admin
|
If phpMyAdmin is using mysql_query() to execute your statements then it will never process more than one line of SQL at a time:
http://us2.php.net/mysql_query
But I'd have to look at the source code to tell you if that is truly the case. |
|||||||||||||
|
|
||||||||||||||
|
darnold
|
That is correct. phpMyAdmin will not allow multiple sql queries to run using the sql query window. You could use the GUI to update more than one row in phpMyAdmin or;
What you are attempting to do would be best run using the mysql CLI. From a linux command prompt type:
Be sure to replace the brackets and terms with real values. |
||||||||||||||
|
|
|||||||||||||||
|
dbodner
|
You can run multiple sql queries in pma, as long as the delimiter used in the queries is the same as what you have checked in phpmyadmin. It breaks them up into an array and throws them in a foreach.
Have you tried checking the 'Show this query here again' box? What is the query it spits back to you as what's being run? |
||||||||||||
|
|
|||||||||||||
| mysql multiple row update |
|
||
|


