hi,
I'm trying to retrive the id number ($ad_id) of the record I just entered:
...
$sth = $dbh->do (qq{INSERT INTO $table..."my record"
$sth = $dbh->prepare ("SELECT LAST_INSERT_ID() FROM $table");
$sth -> execute();
$ad_id = $sth->fetchrow_array();
$sth->finish();
...
The above works fine and gives me the last id, but what worries me is the
possibility of someone submitting new record between the lines "Insert
record" and the rest. Is that a valid concern?
Thanks,
Mariusz
_________________________________________________________________
MSN 8 with e-mail virus protection service: 2 months FREE*
http://join.msn.com/?page=features/virus
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
- Re: MySql LAST ID mario kulka
- Re: MySql LAST ID Felix Geerinckx
- RE: MySql LAST ID Dan Muey