in reply to SELECT LAST_INSERT_ID does not work
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:
ErrorDBI();
Also, I would set $dbh->{RaiseError} to 1, just to be sure that all database errors are fatal.
|
|---|