List:General Discussion« Previous MessageNext Message »
From:Alan Date:February 1 2003 9:18pm
Subject:last_insert_id() returns 0 in windows
View as plain text  
Okay, I've seen just about every question on last_insert_id(), except this

I am running MySQL on Win XP and when I generate a test table (test) with an
AUTO_INCREMENT column (aid) and a second column (a) then use an insert
statement like: INSERT INTO test (a) values (1); then: SELECT
LAST_INSERT_ID(); I get a return value of 0.  I considered the fact that
maybe my connection is closing, but when I create the same table on a remote
Linux server it returns the proper AUTO_INCREMENT ID.  Is there a server
variable I need to set or something that I should be looking for in order to
make this work on Windows?

Al Kearns, Sales Representative/WebMaster, MCP

last_insert_id() returns 0 in windowsAlan1 Feb
  • Re: last_insert_id() returns 0 in windowsDan Nelson2 Feb
  • Re: Re: last_insert_id() returns 0 in windowsNasser Ossareh2 Feb