title: How to optimize a query with MySQL multi-query?
body: <p>I need to optimize a script for high performance so the question is how can I  add MySQL multi-query to this code?</p>
  <pre><code>foreach($multiContent as $htmlContent) {
      $email = urldecode($email['1']);
      $user = $user['1'];
  
      //store in db
      $db-&gt;query(&quot;UPDATE eba_users 
                     SET mail = '$email' 
                   WHERE username = '$user'&quot;);
      //echo &quot;email is $email and user is $user\n&quot;;
    }
  
    //close if ($array_counter % 200
    unset($array_counter);
    unset($data);
  }
  </code></pre>