last_insert_id function

From: Date: Wed, 24 Jan 2001 22:16:29 +0000
Subject: last_insert_id function
Groups: php.general 
Request: Send a blank email to php-general+get-36366@lists.php.net to get a copy of this message
I got this quote right out of the php manual. My Id field happen to be type BIGINT as it said so I tried using LAST_INSERT_ID(); and turn out to be error said "unidentified function". Any clue? ******************************************* mysql_insert_id() converts the return type of the native MySQL C API function mysql_insert_id() to a type of long. 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(). ******************************************** Jack jacky@activelifestyle.com "There is nothing more rewarding than reaching the goal you set for yourself"

« previous php.general (#36366) next »