MySQL Forums
Forum List  »  Newbie

LAST_INSERT_ID()
Posted by: Todd Holtzinger
Date: May 20, 2005 01:39PM

Thank you in advance!

I am trying to use the LAST_INSERT_ID() function but, always get 0 (zero) as the returned value.
Here are the details as I see it.

Server: Novell Netware 6.0
MySQL: 4.1.10
MySQL Query Browser: 1.1.5

Table name: Animals myisam
Field: ID - mediumint(9) not null auto inc
Name - char(30) not null
Index: ID - Primary btree


COMMANDS:

INSERT INTO animals (ID, name) VALUES (NULL,'rabbit') ;

SELECT Last_Insert_ID() ;

I assume that MySQL Query Browser would only use one connection and when MySQL Administrator is checked there are only two threads and the PID is not changing. What am I missing?


Todd

Options: ReplyQuote


Subject
Written By
Posted
LAST_INSERT_ID()
May 20, 2005 01:39PM
May 20, 2005 02:04PM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.