How do I update & delete from multiple tables in one query? What is the best way to do this?
Lets say I want to DELETE from table1, table2, table3, table4
and
UPDATE fields 1-5 on both table5 & table6
<?php
require('db.php');
mysql_query("DELETE FROM table1");
mysql_query("UPDATE table5 SET field1='', field2='', field3='', field4='', field5='' ");
mysql_close();
exit();
?>
Open in new window