MySQL Forums
Forum List  »  Newbie

last_insert_id() returns 0
Posted by: Stijn Niclaes
Date: March 24, 2005 01:42AM

Hi all,

I have a table with an auto_increment id-field of type integer. When I call last_insert_id() from MySql Query Browser, I get 0(I call it immediately after I execute the insert). Now when I call it from Control Center or command-line, I recieve the expected value.
I'm guessing the QB closes the connection after the insert and reconnects when I do the select and I'm wondering if this isn't configurable or something.

Thx in advance,

Stijn

Options: ReplyQuote


Subject
Written By
Posted
last_insert_id() returns 0
March 24, 2005 01:42AM


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.