我是使用MySQL的NodeJS的新用户(npm install mysql)。
当我尝试执行查询
connection.query("select ?? from users where id = ?",[["id","fname","lname"],req.body.userid],function (err, rows) { **here I want query which above executed** });
我想在执行的回调函数中查询。
我怎么才能得到它??。
var c = connection.query("select ?? from users where id = ?",[["id","fname","lname"],req.body.userid],function (err, rows) { console.log(c.sql) });