title: (Mysql) Insert data using Store Procedure with nodejs?
body: <p><strong>I write this code, but I can't know why this code have error with mysql db when I'm trying with store procedure in mysql:</strong></p>
  
  <pre><code>var mysql = require("mysql");
  
  var con = mysql.createConnection({
      host: "localhost",
      port: "8889",
      user: "root",
      password: "root",
      database: "ResetAccountTest"
  });
  
  con.connect(function(err){
      if(err){
         console.log('Error connecting to Database');
         return;
      } console.log('Connection established');
  });
  
  var accountTest = { email: 'mra@fpt.edu.vn', password: 'root', bit: '1' };
  con.query('call newAccount(?, ?, ?)', accountTest, function(err, result) {
      if (err) throw err;
  
      console.log(result.insertId);
  });
  
  con.end(function(err) {
  // The connection is terminated gracefully
  // Ensures all previously enqueued queries are still
  // before sending a COM_QUIT packet to the MySQL server.
  });
  </code></pre>
  
  <p><strong>This's error:</strong></p>
  
  <pre><code>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 '?, ?)' at line 1
  at Query.Sequence._packetToError (/Users/mikegraham/Documents/WebstormProjects/reset-password/node_modules/mysql/lib/protocol/sequences/Sequence.js:48:14)
  at Query.ErrorPacket (/Users/mikegraham/Documents/WebstormProjects/reset-password/node_modules/mysql/lib/protocol/sequences/Query.js:83:18)
  at Protocol._parsePacket (/Users/mikegraham/Documents/WebstormProjects/reset-password/node_modules/mysql/lib/protocol/Protocol.js:274:23)
  at Parser.write (/Users/mikegraham/Documents/WebstormProjects/reset-password/node_modules/mysql/lib/protocol/Parser.js:77:12)
  at Protocol.write (/Users/mikegraham/Documents/WebstormProjects/reset-password/node_modules/mysql/lib/protocol/Protocol.js:39:16)
  at Socket.&lt;anonymous&gt; (/Users/mikegraham/Documents/WebstormProjects/reset-password/node_modules/mysql/lib/Connection.js:96:28)
  at emitOne (events.js:77:13)
  at Socket.emit (events.js:169:7)
  at readableAddChunk (_stream_readable.js:146:16)
  at Socket.Readable.push (_stream_readable.js:110:10)
  --------------------
  at Protocol._enqueue (/Users/mikegraham/Documents/WebstormProjects/reset-password/node_modules/mysql/lib/protocol/Protocol.js:135:48)
  at Connection.query (/Users/mikegraham/Documents/WebstormProjects/reset-password/node_modules/mysql/lib/Connection.js:201:25)
  at Object.&lt;anonymous&gt; (/Users/mikegraham/Documents/WebstormProjects/reset-password/app.js:20:5)
  at Module._compile (module.js:425:26)
  at Object.Module._extensions..js (module.js:432:10)
  at Module.load (module.js:356:32)
  at Function.Module._load (module.js:311:12)
  at Function.Module.runMain (module.js:457:10)
  at startup (node.js:136:18)
  at node.js:972:3
  </code></pre>
  
  <p><strong>Sorry guys, I'm a beginner with nodejs. I hope community can help me solved this problem :D</strong></p>