12 messages in com.mysql.lists.perl$dbh->{'mysql_insertid'} returning 0
FromSent OnAttachments
Nick Tonkin04 Dec 2001 14:40 
Vaughan, Penny04 Dec 2001 14:43 
Ruben Safir04 Dec 2001 15:05 
Vaughan, Penny04 Dec 2001 15:08 
sherzodR04 Dec 2001 15:38 
Nick Tonkin04 Dec 2001 16:24 
Vaughan, Penny05 Dec 2001 08:03 
Chuck O'Donnell05 Dec 2001 08:41 
Vaughan, Penny05 Dec 2001 08:52 
Jochen Wiedmann05 Dec 2001 09:56 
Bernd Prager10 Dec 2001 00:45 
Jochen Wiedmann10 Dec 2001 09:16 
Subject:$dbh->{'mysql_insertid'} returning 0
From:Vaughan, Penny (Penn@turner.com)
Date:12/04/2001 02:43:08 PM
List:com.mysql.lists.perl

Hello all,

I was using $dbh->{'mysql_insertid'} to return the auto_increment number with no
problem until a recent server upgrade. We moved everything to a new box, but
had to re-install the mysql perl modules. We're running mysql 3.22.25. Now,
I'm just getting 0 whether I use the database handle or the statement handle in
my cgi. No error messages are showing up so it thinks it's working.

Clues or red herrings: When I ran select last_insert_id() at the mysql command line I was also was
getting zero until I added a record and then I got a correct number, but still
zeros through the DBI.

When I was trying anything, I used the old $sth->{insert_id} and got a message
telling me that this has been deprecated so I'm guessing that means the modules
are working?

I ran the auto_increment.tst; it looked good. We restarted the mysql server and
last_insert_id() gave zero again at the mysql prompt.

Any suggestions?

Thanks, Penny