note 46536 deleted from function.mysql-insert-id by sean

From: Date: Thu, 14 Oct 2004 18:54:31 +0000
Subject: note 46536 deleted from function.mysql-insert-id by sean
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-78552@lists.php.net to get a copy of this message
Note Submitter: ckengche at yahoo dot com ---- Whether mysql_insert_id() returns the correct auto_increment value generated from the last INSERT statement depends on how you define your AUTO_INCREMENT field in your MySQL table. It is not sufficient to just specify AUTO_INCREMENT for the field, you need to specify is as PRIMARY KEY as well. Eg: CREATE TABLE imuad ( aid int(8) AUTO_INCREMENT PRIMARY KEY, .... ) ---- Reason: useless note

« previous php.notes (#78552) next »