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
  • 27,282
  • 47
  • 125
  • 188

1 Answers1

3

mysql_insert_id()

Have you considered upgrading to PDO?

Community
  • 1
  • 1
alex
  • 460,746
  • 196
  • 858
  • 974