im writing addon for firefox and use SQLite trough XPCOM.
Can anyone explain how to get last inserted id from autoincrement column?
im writing addon for firefox and use SQLite trough XPCOM.
Can anyone explain how to get last inserted 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.