我正在为firefox编写插件,并使用SQLite槽XPCOM。
谁能解释如何从自动增量列中获取最后插入的ID?
最佳答案
您可以使用lastInsertRowId
on the connection。但是,您should avoid using synchronous statement execution,这意味着您不能依赖该属性。您必须运行另一个SQL查询来获取该值。
关于sqlite - FireFox附加组件中最后一次从SQLite插入的ID,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/4890037/