In article <e9**************************@posting.google.com >,
jo****@yahoo.com (jo****@yahoo.com) wrote:
I have a php script that insert database record into the mysql
database, the primary key of the table is auto incremented. how do i
get the primary key of the last record entered?
thanks and regards
Jorn
Either from within MySQ: "SELECT LAST_INSERT_ID()", or with the built-in
PHP function mysql_insert_id(). Warning: the PHP function gives
incorrect results if the id is of type BIGINT.
See <http://nl.php.net/manual/en/function.mysql-insert-id.php>.
JP
--
Sorry, <de*****@cauce.org> is een "spam trap".
E-mail adres is <jpk"at"akamail.com>, waarbij "at" = @.