From: Ben Clewett Date: May 30 2008 2:08pm Subject: Re: Obtaining AUTOINCREMENT of just inserted record, but... List-Archive: http://lists.mysql.com/mysql/213121 Message-Id: <48400A78.5080906@clewett.org.uk> MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit The LAST_INSERT will return the last saved AUTO_INCREMENT for that connection and for no other connection. So if two users on different connections save at the same time, there will not be a problem. Ben Miguel Cardenas wrote: > Hello list > > I need to retrieve the AUTOINCREMENT field from the just inserted record, > note that I say JUST INSERTED and not LAST INSERTED. > > It is for a website that accepts forms submitted by users, but it may occur > in some time that two or more forms are submitted simultaneously by > different users, so not necessarily the last inserted could be the just > inserted, or yes? > > > Thanks for any help >