QUERY 1:
$link = mysql_connect('localhost', 'root', '');
mysql_select_db('rems', $link);
mysql_query('SET AUTOCOMMIT=0; START TRANSACTION', $link);
mysql_query('DELETE FROM admins WHERE admin_id=4', $link);
mysql_query('ROLLBACK; SET AUTOCOMMIT=1', $link);
QUERY 2:
$link = mysql_connect('localhost', 'root', '');
mysql_select_db('rems', $link);
mysql_query('SET AUTOCOMMIT=0;START TRANSACTION;
DELETE FROM admins WHERE admin_id=4;
ROLLBACK; SET AUTOCOMMIT=1', $link);
From the above two queries the first one does not execute properly (transaction does not work) because of executing the queries separately by calling the mysql_query functions multiple times. But i need it do be done by this way. That is i need the result by the first way (calling mysql_query function several times for a single transaction)
Any IDEA please???