开发者

Last inserted id from SQLite in FireFox add-on

im writing addon for firefox and use SQLite trough XPCOM.

Can anyone explain how to get last in开发者_JS百科serted id from autoincrement column?


You can use the lastInsertRowId on the connection. However, you should avoid using synchronous statement execution, which means you cannot rely on that property. You'll have to run another SQL query to get that value.


you can use

SELECT last_insert_rowid();

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜