List:MySQL and Perl« Previous MessageNext Message »
From:Penny  Vaughan Date:December 4 2001 11:08pm
Subject:RE: $dbh->{'mysql_insertid'} returning 0
View as plain text  
I actually had a contrary message:

$sth->{'insertid'} is deprecated, use $sth->{'mysql_insertid'}

when I tried that, so the reverse may be true.

Penny

> -----Original Message-----
> From: Ruben Safir [mailto:ruben@stripped]
> Sent: Tuesday, December 04, 2001 6:06 PM
> To: Nick Tonkin
> Cc: msql-mysql-modules@stripped
> Subject: Re: $dbh->{'mysql_insertid'} returning 0
> 
> 
> That's bad.
> 
> That breaks a lot of legacy code without reason
> 
> 
> Ruben
> 
> On 2001.12.04 17:40:38 -0500 Nick Tonkin wrote:
> >> 
> >> IIRC it's $sth->{insertid} these days .... check the docs 
> for your new
> >> version.
> >> 
> >> 
> >> ~~~~~~~~~~~
> >> Nick Tonkin
> >> 
> >> On Tue, 4 Dec 2001, Vaughan, Penny  wrote:
> >> 
> >>> 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
> >>> 
> >>> 
> >>> 
> >>> 
> >> 
> >> 
> >> 
> ---------------------------------------------------------------------
> >> Please check "http://www.mysql.com/Manual_chapter/manual_toc.html"
> >> before
> >> posting. To request this thread, e-mail
> >> msql-mysql-modules-thread1549@stripped
> >> 
> >> To unsubscribe, send a message to the address shown in the
> >> List-Unsubscribe header of this message. If you cannot see it,
> >> e-mail msql-mysql-modules-unsubscribe@stripped instead.
> >> 
> --
> __________________________
> 
> Brooklyn Linux Solutions
> __________________________
> http://www.mrbrklyn.com - Consulting
> http://www.brooklynonline.com - For the love of Brooklyn
> http://www.nylxs.com - Leadership Development in Free Software
> http://www.nyfairuse.org - The foundation of Democracy
> http://www2.mrbrklyn.com/resources - Unpublished Archive or 
> stories and
> articles from around the net
> http://www2.mrbrklyn.com/mp3/annie.mp3 - Armed and Dangerous....
> http://www2.mrbrklyn.com/downtown.html - See the New Downtown 
> Brooklyn....
> 
> 1-718-382-5752
> 
> 
> 
> 
> 
> ---------------------------------------------------------------------
> Please check 
> "http://www.mysql.com/Manual_chapter/manual_toc.html" before
> posting. To request this thread, e-mail 
> msql-mysql-modules-thread1550@stripped
> 
> To unsubscribe, send a message to the address shown in the
> List-Unsubscribe header of this message. If you cannot see it,
> e-mail msql-mysql-modules-unsubscribe@stripped instead.
> 

Thread
$dbh->{'mysql_insertid'} returning 0Penny  Vaughan4 Dec
  • Re: $dbh->{'mysql_insertid'} returning 0Nick Tonkin4 Dec
    • Re: $dbh->{'mysql_insertid'} returning 0Nick Tonkin5 Dec
  • Re: $dbh->{'mysql_insertid'} returning 0Jochen Wiedmann5 Dec
  • list of open DB handles?Bernd Prager10 Dec
    • Re: list of open DB handles?Jochen Wiedmann10 Dec
Re: $dbh->{'mysql_insertid'} returning 0Ruben Safir5 Dec
  • Re: $dbh->{'mysql_insertid'} returning 0sherzodR5 Dec
RE: $dbh->{'mysql_insertid'} returning 0Penny  Vaughan5 Dec
RE: $dbh->{'mysql_insertid'} returning 0Penny  Vaughan5 Dec
  • Re: $dbh->{'mysql_insertid'} returning 0Chuck O'Donnell5 Dec
RE: $dbh->{'mysql_insertid'} returning 0Penny  Vaughan5 Dec