I run multiple deletes via mysqli :: multi_query and run the following query on a line. The following error is called.
Error - SQLSTATE HY000. Sql error: Commands out of sync; you can't run this command now
Do I need to somehow clear the multiquark so that it does not spoil my next request? What is the reason for this error?
And this is how I run my multiquery
function deleteSomeTables($args){ $sql = 'delete 1;delete another;'; if($database->multi_query($sql)){ return true; }else{ return false; } }
I am using a recent version of Xampp for Windows 7
mysqli multi-query
andrew
source share