Home >Backend Development >PHP Tutorial >PHP+MYSQL查询最大值,字段ID(自增),表table,该怎么处理

PHP+MYSQL查询最大值,字段ID(自增),表table,该怎么处理

WBOY
WBOYOriginal
2016-06-13 10:06:46958browse

PHP+MYSQL查询最大值,字段ID(自增),表table
PHP+MYSQL查询ID最大值,字段ID(自增),表table

请问如何实现

能否给出源码

菜鸟问题,谢谢。。

------解决方案--------------------
SELECT * FROM table ORDER BY ID DESC LIMIT 1
------解决方案--------------------
只要ID值的话,SELECT MAX(ID) FROM table即可

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn