title: Mysqli doesn't allow multiple queries?
body: <p>I am running a script in PHP that uisng a loop creates a string query for MySQL.</p>
  
  <p>After executing the script I get the following error:</p>
  
  <blockquote>
    <p>"You have an error in your SQL syntax; check the manual that
    corresponds to your MySQL server version for the right syntax to use
    near 'UPDATE BANNERS SET pos=1 WHERE BID=5; UPDATE BANNERS SET
    pos=2 WHERE BID=1' at line 2"</p>
  </blockquote>
  
  <p>right after the error I echo the query and it looks like this:</p>
  
  <pre><code>UPDATE BANNERS SET pos=0 WHERE BID=6;
  UPDATE BANNERS SET pos=1 WHERE BID=5;
  UPDATE BANNERS SET pos=2 WHERE BID=1;
  </code></pre>
  
  <p>When I copy and paste it into phpmyadmin, it obviously gets executed without any problem.</p>
  
  <p>Any Ideas?</p>
  
  <p>Here is the PHP code:</p>
  
  <p>There is an array that looks like this:</p>
  
  <pre><code>$order[0] = 'tr_6';
  $order[1] = 'tr_5';
  $order[2] = 'tr_1';
  
  $query = "";
  
  foreach($order as $pos =&gt; $value){
     $idvalue = str_replace('tr_','',$value);
     $query .= "UPDATE BANNERS  SET pos=$pos WHERE BID=$idvalue;\n";
  }
  
  mysqli_query($connection,$query) or die(mysqli_error($connection)."&lt;br/&gt;$query");
  </code></pre>
  
  <p>Thanks!</p>