Re: determining the value of an auto-incremented field (mysql)

From: Date: Thu, 16 Aug 2001 17:31:47 +0000
Subject: Re: determining the value of an auto-incremented field (mysql)
References: 1 2  Groups: php.db 
Request: Send a blank email to php-db+get-11448@lists.php.net to get a copy of this message
----- Original Message ----- From: Kenn Murrah <webmaster@bakergrfx.com> To: <php-db@lists.php.net> Sent: Friday, August 17, 2001 1:17 AM Subject: [PHP-DB] determining the value of an auto-incremented field (mysql) [snip] > Having done so, how can I immediately determine the value of order_number > for this entry, i.e. the auto-incremented value assigned by MySQL? Use mysql_insert_id(), it returns the ID generated for an AUTO_INCREMENT column by the previous INSERT query. regards -- Jason Wong Gremlins Associates www.gremlins.com.hk

« previous php.db (#11448) next »