Previous Thread
Next Thread
Print Thread
Rate Thread
Joined: Mar 2000
Posts: 528
Junior Member
Junior Member
Offline
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.

Sponsored Links
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
Offline
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
Offline
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.

Sponsored Links
Joined: Mar 2000
Posts: 528
Junior Member
Junior Member
Offline
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.


Link Copied to Clipboard
Donate Today!
Donate via PayPal

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.
Recommended Hosts
We have personally worked with and recommend the following Web Hosts:
Stable Host
bluehost
InterServer
Visit us on Facebook
Member Spotlight
hatter
hatter
USA
Posts: 69
Joined: January 2001
Forum Statistics
Forums63
Topics37,573
Posts293,925
Members13,849
Most Online5,166
Sep 15th, 2019
Today's Statistics
Currently Online
Topics Created
Posts Made
Users Online
Birthdays
Top Posters
AllenAyres 21,079
JoshPet 10,369
LK 7,394
Lord Dexter 6,708
Gizmo 5,833
Greg Hard 4,625
Top Posters(30 Days)
Top Likes Received
isaac 82
Gizmo 20
Brett 7
WebGuy 2
Top Likes Received (30 Days)
None yet
The UBB.Developers Network (UBB.Dev/Threads.Dev) is ©2000-2024 VNC Web Services

 
Powered by UBB.threads™ PHP Forum Software 8.0.0
(Preview build 20240506)