Home >php教程 >php手册 >简单实现分页

简单实现分页

WBOY
WBOYOriginal
2016-06-07 11:45:271144browse

只要在调用基本公共的Action中的page方法就能实现简单分页
public function page($counts,$mouldel,$value=NULL,$addtime=NULL){<br> import("ORG.Util.Page");<br> $Page=new Page($counts,5);<br> $show=$Page->show();<br> $list=$mouldel->where($value)->order($addtime)->limit($Page->firstRow.','.$Page->listRows)->select();<br> $data[0]=$list;<br> $data[1]=$show;<br> return $data;<br> }

AD:真正免费,域名+虚机+企业邮箱=0元

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