You can get the last insert id from mySQL on a per-handle basis by asking for:
my $new_id = $dbh->{'mysql_insertid'};Which should get around the problem, unless you're using Apache::DBI or something else that pools database handles.
update: remembered something i saw in the lower reaches of Class::DBI::Extension: you can lock a mysql table using:
$dbh->do('LOCK TABLES mumble WRITE');and later
$dbh->do('UNLOCK TABLES');But it's a rather drastic thing to do, and one of the main reasons some people are rude about MySQL.
In reply to Re: DBI: table locking
by thpfft
in thread DBI: table locking
by George_Sherston
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |