MySQL Error: Commands out of sync; you can't run this command now
I get the above error when I try to execute an SQL Procedure more than once each time.
I've found that it has something to with the "store result", so I've been trying to figure it out for a while, but I haven't succeeded yet.
Here is my PHP code:
$query = "CALL GetObjectsValue(".$FormID.")";
if( $res = $mysqli->query($query) )
{
$mysqli->store_result();
while ($row = $res->fetch_assoc())
{
...
}
$res->free();
}