Is there a way to truncate multiple tables in one query?
This deletes all from only 1 table:
$sql = "TRUNCATE table1"; $result = mysql_query($sql,$connection);
I've tried to add "AND table2" but that's not working.
$sql = "TRUNCATE table1;\r\n"; $sql.= "TRUNCATE table2;\r\n"; $result = mysql_query($sql,$connection);
It is still two queries, and I believe multiple queries are not supported by mysql_query(). I think you have to use multiple queries in separate calls to mysql_query().