List:General Discussion« Previous MessageNext Message »
From:Erich Beyrent Date:May 6 2004 1:07pm
Subject:RE: Last inserted ID
View as plain text  
> Well, you don't need the distinct.
>
> Are you inserting with your PHP script?  LAST_INSERT_ID(), as per the
> 
> manual, 
> only returns the id from the last insert on that connect.  You cannot
get >the 
> LAST_INSERT_ID() for another connection.

j----- k-----

I used distinct because otherwise, I was getting 3575 results from the
command line - I only wanted one.

My PHP script uses an insert method in a class, and then tries to get
the last insert id.  After reading the manual, I was under the
impression that the class would use the same connection, but that
doesn't seem to be the case.  I suppose my insert could return the last
id...

-Erich-


Thread
Last inserted IDErich Beyrent6 May
  • Re: Last inserted IDJoshua J. Kugler6 May
    • RE: Last inserted IDErich Beyrent6 May
  • Re: Last inserted IDDaniel Kasak6 May
  • Re: Last inserted IDPaul DuBois6 May
    • Re: Last inserted IDPaul DuBois6 May