0
On mysql, how can I get last id?
I want get last id on mysql.How can i do this easy ??
1 Antwort
+ 6
You can use the MySQL function:
mysql_insert_id()
For more info, see link:
https://dev.mysql.com/doc/refman/8.0/en/getting-unique-id.html
If you need to retrieve the last ID from within PHP, you can use the PHP function:
mysqli_insert_id()
See link for more info:
http://php.net/manual/en/function.mysql-insert-id.php