exports.post = function(req, res){
var id = JSON.stringify(req.body.id);
var inputData = [req.body.GIVENNAME, req.body.SURNAME, id];
db.run("UPDATE f11 SET GIVENNAME=$GIVENNAME, SURNAME=? WHERE id=?",inputData,
{
$GIVENNAME : GIVENNAME,
$SURNAME : SURNAME,
});
res.redirect("/legone/survey/surveyform/form11");
};

答案 0 :(得分:1)
更新:
您可以尝试运行查询:
var inputData = [req.body.GIVENNAME, req.body.SURNAME, id];
db.run("UPDATE f11 SET GIVENNAME=?, SURNAME=? WHERE id=?",inputData,function(err,rows){
....
});
希望这有帮助!