12-02-2007, 02:03 PM
|
#16 (permalink)
|
|
The Contributor
Join Date: Nov 2007
Location: Nashville
Posts: 44
Thanks: 7
|
Taken From: http://us3.php.net/mysql_insert_id
mysql_insert_id() converts the return type of the native MySQL C API function mysql_insert_id() to a type of long (named int in PHP). If your AUTO_INCREMENT column has a column type of BIGINT, the value returned by mysql_insert_id() will be incorrect. Instead, use the internal MySQL SQL function LAST_INSERT_ID() in an SQL query.
|
|
|