----- Original Message -----
From: Kenn Murrah <[EMAIL PROTECTED]>
Sent: Friday, August 17, 2001 1:17 AM
Subject: [PHP-DB] determining the value of an auto-incremented field (mysql)


> 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.

Jason Wong
Gremlins Associates

PHP Database Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]

Reply via email to