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();
精彩评论