From: Warren Young Date: October 10 2005 6:48pm Subject: Re: problem saving and retrieving an AUTO_INCREMENT value using MySQL variable and LAST_INSERT_ID() List-Archive: http://lists.mysql.com/plusplus/5022 Message-Id: <434AB78D.5080501@etr-usa.com> MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Steve Povilaitis wrote: > Thanks for the prompt reply! I also noticed another problem. From reading > the mySQL documentation variable's aren't persistent across connections. > Since I was using separate connections for the parent and child classes the > variable isn't visible between the two. Thanks again for your help! The whole point of this feature is for your code to save the ID right after you insert the new record. You could then pass it to any child classes that need it.