12 messages in com.mysql.lists.perlRe: $dbh->{'mysql_insertid'} returning 0| From | Sent On | Attachments |
|---|---|---|
| Nick Tonkin | 04 Dec 2001 14:40 | |
| Vaughan, Penny | 04 Dec 2001 14:43 | |
| Ruben Safir | 04 Dec 2001 15:05 | |
| Vaughan, Penny | 04 Dec 2001 15:08 | |
| sherzodR | 04 Dec 2001 15:38 | |
| Nick Tonkin | 04 Dec 2001 16:24 | |
| Vaughan, Penny | 05 Dec 2001 08:03 | |
| Chuck O'Donnell | 05 Dec 2001 08:41 | |
| Vaughan, Penny | 05 Dec 2001 08:52 | |
| Jochen Wiedmann | 05 Dec 2001 09:56 | |
| Bernd Prager | 10 Dec 2001 00:45 | |
| Jochen Wiedmann | 10 Dec 2001 09:16 |
| Subject: | Re: $dbh->{'mysql_insertid'} returning 0![]() |
|---|---|
| From: | Nick Tonkin (ni...@rlnt.net) |
| Date: | 12/04/2001 04:24:23 PM |
| List: | com.mysql.lists.perl |
D'oh, of course I remembered backwards. But you can see that.
~~~~~~~~~~~ Nick Tonkin
On Tue, 4 Dec 2001, 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...@lists.mysql.com
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...@lists.mysql.com instead.




