943,940 Members | Top Members by Rank

Ad:
  • PHP Discussion Thread
  • Unsolved
  • Views: 48047
  • PHP RSS
Jan 23rd, 2006
0

Update query (mysql)

Expand Post »
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
Similar Threads
Reputation Points: 10
Solved Threads: 0
Light Poster
rcasinillo_s is offline Offline
29 posts
since Jan 2006
Jan 24th, 2006
0

Re: Update query (mysql)

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
Reputation Points: 10
Solved Threads: 1
Junior Poster in Training
tristan17 is offline Offline
51 posts
since Sep 2005
Jan 24th, 2006
0

Re: Update query (mysql)

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.
Reputation Points: 10
Solved Threads: 1
Junior Poster
sarahk is offline Offline
138 posts
since Apr 2005

This thread is more than three months old

No one has posted to this discussion for at least three months. Please let old threads die and do not reply to them unless you feel you have something new and valuable to contribute that absolutely must be added to make the discussion complete. Otherwise, please start a new thread in this forum instead.
Message:
Previous Thread in PHP Forum Timeline: error parsing php code
Next Thread in PHP Forum Timeline: Sessions...help me please





About Us | Contact Us | Advertise | Acceptable Use Policy
Forum Index | Build Custom RSS Feed


Follow us on Twitter


© 2011 DaniWeb® LLC