On 11/11/2006 10:16 PM, Will Leshner wrote:

You should be able to get the last inserted rowid using the
last_insert_rowid() function in a query:

SELECT last_insert_rowid();

sorry for the slow reaction, but I had to check my own code first...

On Fri, 28 Jul 2006 16:47:21 +0200, Nemanja Corlija <[EMAIL PROTECTED]> wrote:

There is also a last_insert_rowid() function that is like an alias for sqlite_last_insert_rowid() API function and it works per db connection. I don't think this this is very useful with true AUTOINCREMENT fields, so sqlite_sequence is really the way to go.

based that, I included this in my library...

   elif engine == 'sqlite':
query2 = "SELECT seq FROM sqlite_sequence WHERE name='%s'" % self._table

any clarifying comments?
thanks a lot,
Mario


-----------------------------------------------------------------------------
To unsubscribe, send email to [EMAIL PROTECTED]
-----------------------------------------------------------------------------

Reply via email to