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

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

WBOY
Release: 2016-06-13 10:06:46
Original
934 people have browsed it

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

请问如何实现

能否给出源码

菜鸟问题,谢谢。。

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

Related labels:
source:php.cn
Statement of this Website
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
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template