> $dbh->{mysql_insertid} should work.
...
> I've had wierd things
> like this show up when DBD::mysql is out of date with the mysql shared
> libraries.
Yes, it's possible they're out of sync. We lost the modules in the move and installed new
ones so they're newer than the db. I'll put upgrading to 3.23* on my SA's list of things
to do and that will probably clear everything up.
Penny
> -----Original Message-----
> From: Chuck O'Donnell [mailto:cao@stripped]
> Sent: Wednesday, December 05, 2001 11:42 AM
> To: Vaughan, Penny
> Cc: msql-mysql-modules@stripped
> Subject: Re: $dbh->{'mysql_insertid'} returning 0
>
>
> On Wed, Dec 05, 2001 at 11:03:59AM -0500, Vaughan, Penny wrote:
> > Nothing like a good night's sleep...
> >
> > The crux: using the database handle to get with mysql_insertid just
> > doesn't seem to work anymore, however using the statement handle
> > ($sth->{mysql_insertid'}) is working.
> >
> > I was getting zeros because I didn't realize that "The last ID that
> > was generated is maintained in the server on a per-connection
> > basis." (http://www.mysql.com/doc/M/i/Miscellaneous_functions.html)
> > and I had isolated the code to return the id without bringing an
> > insert statement along that would generate an id for that
> > connection. I'm still getting 0 if I use the database handle
> > despite the note in the Perl DBI section of the manual that still
> > says you can use that as an alternative.
>
>
> Good luck,
>
> Chuck
>
>
>