In addition to the caveats mentioned there, one should not wait too long after the insertion to grab the id; the DB handle may still be connected but the id lost. This might be a common problem.
(Just tidying up since this old thread shows up in searches).
In reply to Re: DBI/MySQL and LAST_INSERT_ID()
by RandomWalk
in thread DBI/MySQL and LAST_INSERT_ID()
by Spidy
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |