I am trying to run multiple queries on some mysql dbs from a php file. However it is not working. Can anyone point out where I am going wrong?
Here is the contents of the php file:
<?
require_once('/home/xxxxxx/public_html/xxxxxx/dbconnect.php');
$query = "
TRUNCATE TABLE db2.table1;
INSERT INTO db2.table1
SELECT
column1, column2, column3, column4
FROM db1.table1;
TRUNCATE TABLE db2.table2;
INSERT INTO db2.table2
SELECT
column1, column2, column3, column4
FROM db1.table2;
ANALYZE TABLE db2.table2;
";
$result = @mysql_query($query);
?>
Thanks in advance for any help.