首页 > 其他 > 详细

搜索分页

时间:2019-01-05 11:36:05      阅读:170      评论:0      收藏:0      [点我收藏+]

<link rel="stylesheet" href="__STATIC__/css/bootstrap.min.css"/>
<form action="{:url(‘index/sou‘)}" method="post">
<input type="text" placeholder="请输入管理员名称" name="word"/><input type="submit" value="搜用户"/>
public function sou(){
$word=Request::instance()->param("word");
$res=Db::table("user")
->where("phone","like","%$word%")
->whereOr("name","like","%$word%")
->paginate(3,false,[‘query‘=>request()->param()]);
// print_r($res);
$this->assign(‘list‘, $res);
$count = Db::table("user")->count();

// 渲染模板输出
return $this->fetch("show",[‘arr‘=>$res,‘a‘=>$count]);
}

搜索分页

原文:https://www.cnblogs.com/gwhm/p/10223696.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!