title: MySql Insert error from node Js
body: <p>I have a MySQL table like this:</p>
  
  <p><a href="https://i.stack.imgur.com/3Wrnc.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/3Wrnc.png" alt="enter image description here"></a></p>
  
  <p>Below is my code from where I am trying to insert data into mysql table:</p>
  
  <pre><code>var data = {
      id          : 1,
      custname    : input.custname,
      custemail   : input.custemail,
      ordertype   : input.ordertype,
      noorder     : input.noorder,
      orderdate   : input.orderdate
  };
  
  var query = connection.query('INSERT INTO order SET ?', data,      function(err,rows) {
      if (err)
          console.log("Error inserting : %s ",err );
  
      res.render('createorder', {title :"Order Created Successfully"});
  });
  </code></pre>
  
  <p>But is giving me the following error:</p>
  
  <pre><code>INSERT INTO order SET `id` = 1, `custname` = 's', `custemail` = 's@gmail.com', `ordertype` = 'Chalbhaja', `noorder` = 2, `orderdate` = '2015-07-24T16:07:58.684Z'
  Error inserting : Error: ER_PARSE_ERROR: 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 'order SET `id` = 1, `custname` = 's', `custemail` = 's@gmail.com', `ordertype` =' at line 1               
  </code></pre>