title: "Commands out of sync; you can't run this command now" - Caused by mysqli::multi_query
body: <p>I am running multiple deletes through <code>mysqli::multi_query</code> and it is messing up the next query in line. The following error is being thrown.  </p>
  
  <pre><code>Error - SQLSTATE HY000. 
  Sql error: Commands out of sync; you can't run this command now
  </code></pre>
  
  <p>Do I need to somehow clear the multi query so it doesn't mess with my next query? What is the cause of this error?</p>
  
  <p>And this is how I am running my multi query:</p>
  
  <pre><code>function deleteSomeTables($args) {
      $sql = 'delete 1;delete another;';
      if ($database-&gt;multi_query($sql)) {
          return true;
      } else {
          return false;
      }
  }
  </code></pre>
  
  <p>I am using a recent version of Xampp on windows 7</p>