title: How do I update multiple rows in one query
body: <p>I know this question may be asked too many times on these forums but I genuinely cannot find a solid answer. They all give different methods. </p>
  
  <p>Anyway, I have this code to update one row: </p>
  
  <pre><code>$sql = "UPDATE $userName SET P1 = '$p1MON' WHERE day = 'MON1'";
  </code></pre>
  
  <p>Is it possible to update multiple rows in the same query? Something like this:</p>
  
  <pre><code>$sql = "UPDATE $userName SET P1 = '$p1MON' WHERE day = 'MON1',
          UPDATE $userName SET P1 = '$p1TUE' WHERE day = 'TUE1',
          UPDATE $userName SET P1 = '$p1WED' WHERE day = 'WED1'";
  </code></pre>
  
  <p>Or, to update multiple rows in one query, do they have to share an identifier?</p>
  
  <p>Thanks.</p>
  
  <p>EDIT: A suggestion in the comments , doesn't seem to work...</p>
  
  <pre><code>$sql = "UPDATE $userName SET P1 = '$p1MON' WHERE day = 'MON1';
          UPDATE $userName SET P1 = '$p1TUE' WHERE day = 'TUE1';
          UPDATE $userName SET P1 = '$p1WED' WHERE day = 'WED1'";
  </code></pre>