Darkmatter5 Posted October 1, 2008 Share Posted October 1, 2008 With the following code, how can I update records 2, 44, 66, and 207 all at once with one query? UPDATE jobs SET employee_id=6 WHERE job_id=2 Thanks! Quote Link to comment https://forums.phpfreaks.com/topic/126609-solved-how-to-update-multiple-records-with-one-query/ Share on other sites More sharing options...
revraz Posted October 1, 2008 Share Posted October 1, 2008 This should work WHERE job_id IN (2,44,66,207) Quote Link to comment https://forums.phpfreaks.com/topic/126609-solved-how-to-update-multiple-records-with-one-query/#findComment-654703 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.