[PHP] Retrieving newly created ID from MySQL?

2003-03-26 Thread Ben Cheng
If I have a MySQL table with an auto-incrementing ID field, is there an easy way to retrieve the new ID after I insert a new row into the table? For example, if I insert a row into a table with ID, Title, Content fields, is there a way I can get the ID value without doing a separate select

Re: [PHP] Retrieving newly created ID from MySQL?

2003-03-26 Thread Leif K-Brooks
The manual is your friend! :) Have a look at http://www.php.net/manual/en/function.mysql-insert-id.php. Ben Cheng wrote: If I have a MySQL table with an auto-incrementing ID field, is there an easy way to retrieve the new ID after I insert a new row into the table? For example, if I insert a