List:General Discussion« Previous MessageNext Message »
From:Nasser Ossareh Date:February 2 2003 9:46pm
Subject:Re: Re: last_insert_id() returns 0 in windows
View as plain text  
Could it be that the table types are different?

the innodb table types seem to ignore auto_increment
while MyISAM are more accommodating...  so it might be
that your table on Linux is MyISAM type while the
table on XP is Innodb type.

--- Alan <alan@stripped> wrote:
> Okay, I've seen just about every question on
> last_insert_id(), except this
> one:
> 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
> alan@stripped
> 1-866-858-9200
> Before posting, please check:
>   (the manual)
>           (the list
> archive)
> To request this thread, e-mail
> <mysql-thread131434@stripped>
> To unsubscribe, e-mail
> <>
> Trouble unsubscribing? Try:

Do you Yahoo!?
Yahoo! Mail Plus - Powerful. Affordable. Sign up now.
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