I try to insert some data into mysql data base using post method, but it ain't ,keep showing mysql synta error
app.post('/form',function (req,res) {
var post = req.body
dbconn.query('INSERT INTO employee SET?',[post],function(err,result){
if(err)
console.log(err);
else
console.log('inserted ');
});
the error : code: 'ER_PARSE_ERROR', errno: 1064, sqlMessage: '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', sqlState: '42000', index: 0, sql: 'INSERT INTO employee SET ' }