title: Update columns in MySQL depending on cell value
body: <p>I want to update multiple cells in a MySQL table depending on value.</p>
  
  <p>I find that if I take a field called engagement I can update it one at a time like so:</p>
  
  <pre><code>UPDATE billing_info_test 
  SET Engagement='800000039768' 
  WHERE Engagement IS NULL and LinkedAccountId = '12345678910'
  </code></pre>
  
  <p>However, if I try to do multiple at a time it fails and I get an error:</p>
  
  <pre><code>UPDATE billing_info_test 
  SET Engagement='800000039768' 
  WHERE Engagement IS NULL and LinkedAccountId = '12345678910' 
  AND SET Engagement='800000039768' 
  WHERE Engagement IS NULL and LinkedAccountId = '3542123267612';
  </code></pre>
  
  <blockquote>
    <p>ERROR 1064 (42000): 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 'SET Engagement='800000039768' WHERE Engagement IS NULL and LinkedAccountId = '30' at line 1</p>
  </blockquote>
  
  <p>Is it incorrect to use AND between these statements? What am I doing wrong? </p>