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]

Reply via email to