How to get latest ID number in a table?

后端 未结 7 1867
日久生厌
日久生厌 2021-01-22 00:58

How can I get the latest ID in a table?

7条回答
  •  说谎
    说谎 (楼主)
    2021-01-22 01:30

    Also, for the id of the last record inserted, if you're using MySQLi, it would look like this:

    $mysqli->insert_id

    http://php.net/manual/en/mysqli.insert-id.php

提交回复
热议问题