[PHP] php/mysql - getting ID of query

2007-08-21 Thread John Pillion
This is as much a mysql question as it is php. What is the most reliable way to retrieve an auto_increment key/id for a query you just inserted? In other words, I compile all my data, insert it into a new row, and now I want to retrieve the ID it created for it in the ID/key field.

Re: [PHP] php/mysql - getting ID of query

2007-08-21 Thread mike
mysql_insert_id() mysqli_insert_id() http://us.php.net/mysql is your friend :) http://us.php.net/mysqli too! On 8/21/07, John Pillion [EMAIL PROTECTED] wrote: This is as much a mysql question as it is php. What is the most reliable way to retrieve an auto_increment key/id for a query you