Hi guys I want to commit the transaction if all the queries executed in the loop, or else I need to rollback how do i do this, I tried this , but I am not sure how efficient it is.
mysql_query("START TRANSACTION");
for($i=0;$i<100;$i++)
{
$res=mysql_query("some query")
array_push($array,$res);
}
if(in_array(0,$array))
mysql_query("rollback");
else
mysql_query("commit");
If its there any efficient method plese let me know, any help will be much appriciated,
Thanks in advance.