Re: Simple question on auto_increment

From: Date: Mon, 13 Nov 2006 21:16:33 +0000
Subject: Re: Simple question on auto_increment
References: 1  Groups: php.db 
Request: Send a blank email to php-db+get-42664@lists.php.net to get a copy of this message
mario wrote:
Hello, really a mysql question. Pls. help anyway. Is there a simple, common way to implemt the following: Say I have a table with a id autoincrement field. I wish to insert a record but just ist id value, get back the id value, use it to update the record. Do I need three separate mysql queries? Is there some trick I may use? Thanks Regards mario www.php.net/mysql_insert_id --or-- www.php.net/mysqli_insert_id
(of course for your example to work all the other fields would have to be nullable)

« previous php.db (#42664) next »