title: Update multiple rows in a single MySQL query
body: <p>I am trying to run this:</p>
  
  <pre><code>UPDATE test 
  SET col2=1 WHERE col1='test1', 
  SET col2=3 WHERE col1='test2';
  </code></pre>
  
  <p>The error I am getting:</p>
  
  <pre class="lang-none prettyprint-override"><code>[Err] 1064 - 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 '
  </code></pre>
  
  <p>My table:</p>
  
  <pre><code>CREATE TABLE `test` (
      `col1` varchar(30) NOT NULL,
      `col2` int(5) DEFAULT NULL,
      PRIMARY KEY (`col1`)
  ) ENGINE=InnoDB DEFAULT CHARSET=latin1;
  </code></pre>
  
  <p>It’s something about <code>,</code> at the end of the first row. When I changed it to <code>;</code>, it didn’t recognize col2. How can I do this in one query?</p>