$time = strtotime(2018-03-29 12:00:12); // 将日期转成时间戳

$sql = “cust.id>0″;
if($logmin){
$sql.=” and cust.create_time >= ‘$logmin'”;
}
if($logmax){
$sql.=” and cust.create_time <= ‘$logmax'”;
}
if($name){
$sql.=” and cust.name like ‘%$name%'”;
}
if($phone)
{
$sql.=” and cust.phone like ‘%$phone%'”;
}

$custList=Db::table(‘cust’)->where($sql)->order(“create_time DESC”)->paginate($pagecount,false,[‘query’=>request()->param()]);

发表评论