thinkphp6 另一种where判断写法
记录一下这种判断写法
$sqlModel = Db::name('news'); $sqlModel = $sqlModel->where('endtime','>=',time()); $sqlModel = $sqlModel->where('begintime','<=',time()); $sqlModel = $sqlModel->where('endtime','>=',time());
$sqlModel = $sqlModel->whereRaw("FIND_IN_SET('{$companyinfo['tradeid']}', tradeid)"); $sqlModel = $sqlModel->where('province','in',$province.',不限');
$list = $sqlModel ->fetchSql(false) ->paginate(['list_rows'=>20,'query' => request()->param()]);