After you have inserted the record, use the statement; $rowid = mysql_insert_id();
$rowid will contain the value inserted by the last insert command. Janet ----- Original Message ----- From: "michele" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Sunday, February 17, 2002 3:52 PM Subject: [PHP-DB] Beginner query about mysql... > I have a table with a ID field 'auto_increment', > when i insert a record in the table, > how can i know the value of the ID inserted by the mySQL? > Thank's, > Michele. > > > -- > PHP Database Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php > > -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php