mysql_insert_id

mysql_insert_id -- Get the id generated from the previous INSERT operation

Description

int mysql_insert_id(int [link_identifier] );

mysql_insert_id() returns the ID generated for an AUTO_INCREMENTED field. This function takes no arguments. It will return the auto-generated ID returned by the last INSERT query performed.