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! 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) 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
Archived
This topic is now archived and is closed to further replies.