in reply to DBI/MySQL and LAST_INSERT_ID()

I'll bring Perl into the thread by pointing out that using $dbh->{mysql_insertid} will save you from parsing and executing a query.