Search code examples
mysqllastinsertid

mysql : Any command to use instead of mysql_insert_id(); in PHP?


I want to get primarykey ID of just insert item. In PHP has mysql_insert_id(). I write in C#


Solution

  • If cmd is your command object try:

      cmd.LastInsertId;