title: Nodejs mysql ON DUPLICATE KEY UPDATE
body: <p>I'm using <a href="https://github.com/felixge/node-mysql/" rel="nofollow noreferrer">Node Mysql</a></p>
  <pre><code>var values = []; //array with actual values
  var sql = &quot;INSERT INTO table (field1, field2) VALUES ? ON DUPLICATE KEY UPDATE updated_at = now()&quot;;
  
  connection.query(sql, values, function() {
  
  });
  </code></pre>
  <p>And I get an error</p>
  <pre><code>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 
  'ON DUPLICATE KEY UPDATE updated_at = now()
  </code></pre>
  <p>Meanwhile the same query works in mysql cli.</p>
  <p>What could be the problem?</p>