【发布时间】:2017-01-27 05:56:32
【问题描述】:
db.run("INSERT INTO test VALUES (?)", [testVal], function(err) {
console.log(err);
console.log(this.lastId);
console.log(this);
})
错误 - 返回空值, this.lastID - 返回未定义, this - 返回 Window 对象
如何获得最后一个插入标识符?
【问题讨论】:
标签: javascript node.js sqlite