Home  >  Article  >  Backend Development  >  内容下上分页

内容下上分页

WBOY
WBOYOriginal
2016-06-13 13:22:52899browse

内容上下分页
思路:
你指定一个ID(当前的,比如是10) 
 上一页就是比10小而且是最大的。只要你去获取比10小而且是最大的。
下一页就是比10大的,而且是最小的。

求代码支持 请各位大侠帮帮忙

------解决方案--------------------
select id from table where id>当前ID limit 0,1;
select id from table where id------解决方案--------------------
select id from table where id>当前ID order by id asc limit 1; //下一条
select id from table where id
接下来就很简单了吧。

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