in reply to Finding last inserted id through DBI

SQL to the effect of "SELECT * FROM tablename ORDER BY timestampfieldname DESC LIMIT 1" should do what you want.

It ought to work on any SQL database, but I won't swear to it as I don't have a non-MySQL server to test it on.

-Matt

  • Comment on Re: Finding last inserted id through DBI