title: maximum query length in mysqli_query
body: <p>How can I determine the maximum $query parameter received by function mysqli_multi_query (or mysqli_query), in PHP?
  I have a php program which generates a large string made of UPDATE sql commands, separated by ';' The Problem is that if that string exceeds a certain length mysqli_query generates an error like 'MySQL server has gone away'. I notice that that length seems to be around 1MB, but how can I probe-it so that I can make sure that I never exceed that length?</p>
  
  <p>The script needs to run about 7000 updates, on 25 or so fields. Executing one update at a time proved very slow, Concatenating multiple updates runs much faster.</p>
  
  <p>Any possibility to run multiple queries even faster?</p>
  
  <p>Thanck you for any advice!</p>