title: Unknown column in 'field list' error when running mysql query in node.js
body: <p>I am writing an sql query in node.js that always gives error: unkown column in field list, whenever i try to use a string as a value, but not another data type</p>
  <p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false">
  <div class="snippet-code">
  <pre class="snippet-code-html lang-html prettyprint-override"><code>CREATE TABLE tableform (
  id int auto_increment primary key,
  billID int,
  dinnerID int,
  url text,
  FOREIGN KEY (billID) REFERENCES bill(billID),
  FOREIGN KEY (dinnerID) REFERENCES dinner(dinnerID)
  );</code></pre>
  </div>
  </div>
  </p>
  <p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false">
  <div class="snippet-code">
  <pre class="snippet-code-html lang-html prettyprint-override"><code>    updatedatabase: function (billID, dinnerID, tablename, restaurant) {
          conn.query('insert into tableform(billID,dinnerID,url) values (' +billID+ ',' +dinnerID+ ',' + number + ');',
              function (err, results, fields) {
                  if (err) throw err;
                  else console.log('update');
              });
      }</code></pre>
  </div>
  </div>
  </p>
  <p>In the code shown, if I change variable number to 4 (i.e. var number = 4; on the 3rd line, the query works fine. If it's a string (as shown in the code), the error message appears.</p>
  <p>There shouldn't be any error messages and the code should run fine if number is a string. However, the aforementioned error message still shows.</p>
  <p>Errors:</p>
  <p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false">
  <div class="snippet-code">
  <pre class="snippet-code-html lang-html prettyprint-override"><code>Error: Unknown column 'sfsdfsd' in 'field list'
      at Packet.asError (c:\Users\Documents\GitHub\node_modules\mysql2\lib\packets\packet.js:684:17)
      at Query.execute (c:\Users\Documents\GitHub\node_modules\mysql2\lib\commands\command.js:28:26)
      at Connection.handlePacket (c:\Users\Documents\GitHub\node_modules\mysql2\lib\connection.js:455:32)
      at PacketParser.onPacket (c:\Users\Documents\GitHub\node_modules\mysql2\lib\connection.js:73:18)
      at PacketParser.executeStart (c:\Users\Documents\GitHub\node_modules\mysql2\lib\packet_parser.js:75:16)
      at Socket.&lt;anonymous&gt; (c:\Users\Documents\GitHub\node_modules\mysql2\lib\connection.js:80:31)
      at Socket.emit (events.js:189:13)
      at Socket.EventEmitter.emit (domain.js:441:20)
      at addChunk (_stream_readable.js:284:12)
      at readableAddChunk (_stream_readable.js:265:11)</code></pre>
  </div>
  </div>
  </p>