I am trying to insert queries into multiple tables using the following code. I have tried without the TRANSACTION and it will not work, individually they work. Any help would be much appreciated.
Thanks in advance.
$query = mysql_query("BEGIN;
INSERT INTO `uc` (`ANO`, `CNO`, `P`) VALUES ('$ano', '$cno', '$p');
INSERT INTO `ct` (`ANO`, `CNO`, `RNO`) VALUES ('$ano','$cno','$rno');
COMMIT;");
$query_run = mysql_query($query);