[英]How to Get last Insert Id in php without insert any data?
我需要在PHP中last inserted record
而不插入任何数据, id before insert
任何数据id before insert
需要id before insert
。
I hope this is what you're looking for 我希望这是你要找的
SELECT id FROM table ORDER BY id DESC LIMIT 1
Hope this helps you out 希望这可以帮助你
Simply use 只需使用
SELECT MAX(id) FROM your_table_name
Or using PDO 或使用PDO
PDO::lastInsertId
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.