go ahead... be a heretic | |
PerlMonks |
Re: SELECT LAST_INSERT_ID does not workby Corion (Patriarch) |
on Jun 28, 2017 at 06:05 UTC ( [id://1193756]=note: print w/replies, xml ) | Need Help?? |
Maybe you have autocommit on or something weird? From the MySQL documentation ( version 5.5), LAST_INSERT_ID() is per-connection, so it should be valid for each of your clients.
As a stylistic note, calling your error handler as &ErrorDBI; may or may not be what you want. Your method of calling it passes it the current contents of @_. The more explicit way of calling a function is:
Also, I would set $dbh->{RaiseError} to 1, just to be sure that all database errors are fatal.
In Section
Seekers of Perl Wisdom
|
|