fcruz5
asked on
Update & Delete from multiple tables in PHP?
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
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();
?>
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.