title: PHP/MySQL : UPDATE multiples values with multiples WHERE
body: <p>The problem I'm having is with a strategy browser game which has 7 types of values. The problems are as follows:</p>
  
  <ol>
  <li>I got 7 different values in <code>$_POST</code>, from index unit_1 to index unit_7 included. These 7 values are INTEGERS between 0 and 20 and aren't static. They can at each call of the page. They represent the number of units sent.</li>
  <li>I got 7 lines in a table that does not follow the same schema : <code>"nameUnit" = "Soldier"</code> &amp;&amp; <code>nbUnit = "0"</code>, <code>"nameUnit" = "Mage"</code> &amp;&amp; <code>nbUnit = "5"</code>, etc..</li>
  <li>I need to do an update on the number of units in 1 request, but I don't know how to do this.</li>
  </ol>
  
  <p>Example of what I want to do : </p>
  
  <pre><code>UPDATE x SET nbUnit = $_POST['u1'] WHERE nameUnit = "Soldier", nbUnit = $_POST['u2'] WHERE nameUnit = "Mage" [...]
  </code></pre>
  
  <p>Is it possible to do this that way and can it be done in a single query?</p>