List:MySQL++« Previous MessageNext Message »
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()
View as plain text  
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.
Thread
problem saving and retrieving an AUTO_INCREMENT value using MySQL variable and LAST_INSERT_ID()Steve Povilaitis10 Oct
RE: problem saving and retrieving an AUTO_INCREMENT value using MySQL variable and LAST_INSERT_ID()Steve Povilaitis10 Oct
  • Re: problem saving and retrieving an AUTO_INCREMENT value using MySQLvariable and LAST_INSERT_ID()Warren Young10 Oct
  • Re: problem saving and retrieving an AUTO_INCREMENT value using MySQLvariable and LAST_INSERT_ID()Ovidiu Bivolaru10 Oct