kernelgpf Posted October 17, 2007 Share Posted October 17, 2007 Is there a way to update several tables in the same query? My query is- mysql_query("update dragons set age=age+0.14,bondedwithtoday='0',dailyflight='no' where dead='no'"); And I want it to update the following tables: dragons,pegasus,fairies,unicorns,hippogriff but they all have the same columns.. Thanks! -Alyssa Link to comment https://forums.phpfreaks.com/topic/73696-solved-update-several-tables-in-one-query/ Share on other sites More sharing options...
darkfreaks Posted October 17, 2007 Share Posted October 17, 2007 nvm Link to comment https://forums.phpfreaks.com/topic/73696-solved-update-several-tables-in-one-query/#findComment-371834 Share on other sites More sharing options...
kernelgpf Posted October 17, 2007 Author Share Posted October 17, 2007 Oh okay. =P Link to comment https://forums.phpfreaks.com/topic/73696-solved-update-several-tables-in-one-query/#findComment-371842 Share on other sites More sharing options...
marcus Posted October 17, 2007 Share Posted October 17, 2007 You're going to need to use an INNER JOIN. Link to comment https://forums.phpfreaks.com/topic/73696-solved-update-several-tables-in-one-query/#findComment-371849 Share on other sites More sharing options...
kernelgpf Posted October 17, 2007 Author Share Posted October 17, 2007 I can figure it out from there. Thanks mgallforever. =] Link to comment https://forums.phpfreaks.com/topic/73696-solved-update-several-tables-in-one-query/#findComment-371851 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.