I am developing a home decoration website recently, and there are a lot of customer needs. . . .
You need to use native sql to solve it.
tp5’s order does not support pornographic operations and will be filtered out by default. . . .
//use think\paginator\driver\Bootstrap; 记得引入 $pageSize=8;//每页8条 $currPage=input('page',1); $list = Db::query("select * from osc_sms order by id limit ?,?",[($currPage-1)*$pageSize,$pageSize]); $total = Db::query("select count(*) cnt from osc_sms")[0]['cnt']; $pagernator = Bootstrap::make($list,$pageSize,$currPage,$total,false,['path'=>Bootstrap::getCurrentPath(),'query'=>request()->param()]); $page = $pagernator->render();