I am updating table when i run this query it give an error:
client.query('UPDATE Campaign SET ( Name, StartDate ) VALUES ( "' +req.body.Name+ '" , "' +req.body.StartDate+ '" ) WHERE idCampaign = ' +id , function(err, result) {
if(err) {
console.log("err found" + err);
}
else{
console.log(result);
res.send(result[0])
}
});
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 '( Name, StartDate ) VALUES ( "" , "" ) WHERE idCampaign = 89126b2d-c906-11e2-9cf'
I dont know where the error is