On Thu, Jun 17, 2004 at 12:06:29PM +1000, Daniel Kasak wrote:
> Hi all.
> 
> I'm using DBI-1.42, Perl-5.8.4, MySQL-4.0.18 and DBD::MySQL-2.9003.
> I'm trying to get the ID of the last inserted record.
> 
> I can use:
> 
> >$dbh->{'mysql_insertid'}
> 
> and it returns the correct value, however if I change the above to:
> 
> >$dbh->last_insert_id()
> 
> it doesn't work. It returns undef.
> I'd like to use last_insert_id() because I want to be able to use this
> bit of code to handle updates with different databases.
> 
> What's up?

The driver version you're using probably hasn't implemented the
last_insert_id() method.

Tim.

Reply via email to