SharkBait Posted March 22, 2007 Share Posted March 22, 2007 I've never really looked into it but can you UPDATE multiple tables at once? I normally just update one table at a time but I wouldn't mind being to update 2 tables at once. I SELECT them via JOINs so I'd like to update them too Link to comment https://forums.phpfreaks.com/topic/43874-solved-update-multiple-tables-at-once/ Share on other sites More sharing options...
fenway Posted March 22, 2007 Share Posted March 22, 2007 Pretty much whatever you can retrieve with a SELECT you can UPDATE as well, at least in 4.0+... Link to comment https://forums.phpfreaks.com/topic/43874-solved-update-multiple-tables-at-once/#findComment-212986 Share on other sites More sharing options...
SharkBait Posted March 22, 2007 Author Share Posted March 22, 2007 Something similar to: UPDATE Table1, Table2 SET Table1.Blah = 'WOO', TABLE2.Widget = '12345' WHERE Table1.id = '1' AND Table2.id = Table1.id ?? Link to comment https://forums.phpfreaks.com/topic/43874-solved-update-multiple-tables-at-once/#findComment-213012 Share on other sites More sharing options...
fenway Posted March 23, 2007 Share Posted March 23, 2007 Yup. Link to comment https://forums.phpfreaks.com/topic/43874-solved-update-multiple-tables-at-once/#findComment-213432 Share on other sites More sharing options...
SharkBait Posted March 23, 2007 Author Share Posted March 23, 2007 Cool thanks Link to comment https://forums.phpfreaks.com/topic/43874-solved-update-multiple-tables-at-once/#findComment-213578 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.