thinkphp单个字段筛选怎么弄
展开全部
直接where就可以了
public function list_admin()
{
$where = [];
$search = $this->request->get('search');
if($search)
{
$where[] = ['tel|mail','like','%' . $search . '%'];
}
$list = $this->AdminMode->where($where)->paginate($this->config->get('system_pagesize'));
$page = $list->render();
$this->assign('list',$list);
$this->assign('page',$page);
$this->assign('pagetitle','管理员列表');
return $this->fetch();
}
应该对你有帮助
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询