mysql_insert_id

mysql_insert_id -- get generated id from last INSERT

Description

int mysql_insert_id(void);

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.