|
|
Joined: Mar 2000
Posts: 528
Junior Member
|
Junior Member
Joined: Mar 2000
Posts: 528 |
If I try to run the following:
UPDATE w3t_Backup SET B_Subject="The Telana" WHERE B_Number='205';
...it works fine. But if I try to bundle them where I update multiple subjects at once:
UPDATE w3t_Backup SET B_Subject="The Telana" WHERE B_Number='205'; UPDATE w3t_Backup SET B_Subject="A Lost Brother" WHERE B_Number='206'; UPDATE w3t_Backup SET B_Subject="Family Reunion" WHERE B_Number='208';
...I am getting SQL Command Errors in the SQL Command Box in the Admin area.
[]You have an error in your SQL syntax. Check the manual that corresponds to your MySQL server version for the right syntax to use near '; UPDATE w3t_Backup SET B_Subject="A Lost Brother" WHERE B_Num row(s) affected by your query. [/] Do I have something in the wrong spot in that? I have tried single and double quotes around my subject line, nothing has worked so far with multiple UPDATES
" and ' and ` all fail.
|
|
|
|
Joined: Nov 2001
Posts: 10,369
I type Like navaho
|
I type Like navaho
Joined: Nov 2001
Posts: 10,369 |
Yeah, you can only do 1 UPDATE per query. You might be able to do multiple queries in phpMyAdmin. But I'm not sure if the Threads SQL panel is set up for that.
Oh and - they should all be single quotes. '
|
|
|
|
Joined: Mar 2000
Posts: 528
Junior Member
|
Junior Member
Joined: Mar 2000
Posts: 528 |
K, wasn't sure if that had something to do with it.
What is funny...is my phpMyAdmin is also giving me fits with this. It complains about my quotes...single versus double. Now to figure that one out!
|
|
|
|
Joined: Mar 2000
Posts: 528
Junior Member
|
Junior Member
Joined: Mar 2000
Posts: 528 |
Yea, here is a fun one. Three different versions here, all three error out:
UPDATE w3t_Posts SET B_Subject=`Chess Pieces` WHERE B_Number=218 MySQL said: Unknown column 'Chess Pieces' in 'field list'
UPDATE w3t_Posts SET B_Subject='Chess Pieces' WHERE B_Number=218; MySQL said: You have an error in your SQL syntax. Check the manual that corresponds to your MySQL server version for the right syntax to use near '\'Chess Pieces\' WHERE B_Number=218' at line 1
UPDATE w3t_Posts SET B_Subject="Chess Pieces" WHERE B_Number=218; MySQL said: You have an error in your SQL syntax. Check the manual that corresponds to your MySQL server version for the right syntax to use near '"Chess Pieces" WHERE B_Number=218' at line 1
|
|
|
|
Joined: Nov 2001
Posts: 10,369
I type Like navaho
|
I type Like navaho
Joined: Nov 2001
Posts: 10,369 |
Are you using the stright up and down quote ' or the slanted single quote in the upper left of your keyboard. ` It should be the straight up and down one.
|
|
|
|
Joined: Mar 2000
Posts: 528
Junior Member
|
Junior Member
Joined: Mar 2000
Posts: 528 |
FYI it was my version of phpMyAdmin...I upgraded just now, ran the same UPDATE file, and it worked fine.
Who woulda thunk!
|
|
|
|
Joined: Nov 2001
Posts: 10,369
I type Like navaho
|
I type Like navaho
Joined: Nov 2001
Posts: 10,369 |
Wow -that's an odd one. Glad you got it sorted out.
|
|
|
Donate to UBBDev today to help aid in Operational, Server and Script Maintenance, and Development costs.
Please also see our parent organization VNC Web Services if you're in the need of a new UBB.threads Install or Upgrade, Site/Server Migrations, or Security and Coding Services.
|
|
Posts: 69
Joined: January 2001
|
|
Forums63
Topics37,573
Posts293,925
Members13,849
|
Most Online5,166 Sep 15th, 2019
|
|
Currently Online
Topics Created
Posts Made
Users Online
Birthdays
|
|
|
|
|