Update query (mysql)

Reply

Join Date: Jan 2006
Posts: 29
Reputation: rcasinillo_s is an unknown quantity at this point 
Solved Threads: 0
rcasinillo_s rcasinillo_s is offline Offline
Light Poster

Update query (mysql)

 
0
  #1
Jan 23rd, 2006
Good day members!

Could somebody help me here, could modify it for me. There is an error in the syntax:

$query = "UPDATE jobs SET position = '$position1', description = '$description1' WHERE id = '$checkbox1'";
$query = $query . " 'UPDATE jobs SET position = '$position2', description = '$description2' WHERE id = '$checkbox2'";
$query = $query . " 'UPDATE jobs SET position = '$position3', description = '$description3' WHERE id = '$checkbox3'";

Thanks in advance....

Roland
Reply With Quote Quick reply to this message  
Join Date: Sep 2005
Posts: 51
Reputation: tristan17 is an unknown quantity at this point 
Solved Threads: 1
tristan17 tristan17 is offline Offline
Junior Poster in Training

Re: Update query (mysql)

 
0
  #2
Jan 24th, 2006
hi,

i haven't try out on a actual database yet, but maybe it could be due to the'$variable', u can try to remove the ' ' ,hope it helps, if its not working, can u let me know the error message??

tris
Reply With Quote Quick reply to this message  
Join Date: Apr 2005
Posts: 138
Reputation: sarahk is an unknown quantity at this point 
Solved Threads: 1
sarahk's Avatar
sarahk sarahk is offline Offline
Junior Poster

Re: Update query (mysql)

 
0
  #3
Jan 24th, 2006
I'd say it's because MySQL will only accept one database command at a time. When you put the full string into phpMyAdmin it's code will break it up into 3 update commands and send them down. You have to do this yourself.
Reply With Quote Quick reply to this message  
Reply

This thread is more than three months old.
Perhaps start a new thread instead?
Message:


Thread Tools Search this Thread



About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC