1

Possible Duplicate:
PHP: how to get last inserted ID of a table?

I use mysql_query() in PHP to insert a new record in my Database.

It will auto generate a row, with a user Id, can I use the result to get that Id?

Community
  • 1
  • 1
DNB5brims
  • 29,344
  • 50
  • 131
  • 195

1 Answers1

3

mysql_insert_id()

Have you considered upgrading to PDO?

Community
  • 1
  • 1
alex
  • 479,566
  • 201
  • 878
  • 984