How to get the last field in a Mysql database with PHP?

前端 未结 5 1842
故里飘歌
故里飘歌 2020-12-19 13:21

I have mysql database and I want to get the last ID from field in a table .

example : -

id   Value
1    david
2    jone
3    chris

5条回答
  •  野趣味
    野趣味 (楼主)
    2020-12-19 13:56

    If you want to select the ID of the most recently inserted row in a table with an AUTO_INCREMENT column, you will likey be interested in MySQL's LAST_INSERT_ID function.

提交回复
热议问题