Is there a way to return the id of a row that was just created in MySQL with PHP?

前端 未结 6 1967
Happy的楠姐
Happy的楠姐 2021-01-19 09:52

When I create a new entry in my MySQL database, I\'d like the query to return the id of the table that was just created. If it cannot do this, is there another way to find

6条回答
  •  一个人的身影
    2021-01-19 10:26

    Do you mean the ID of the record you have just inserted into a table, if so you are looking for mysql_insert_id.

提交回复
热议问题