$map = [];
$map[] = [['status1', '>', 0]];
$map[] = [['status2', '>', 0]];
$vicount = Db::name('test')->where('test_id', $id)->where(function ($q) use ($map) {
$q->whereOr($map);
})->select();
$map = [];
$map[] = [['status1', '>', 0]];
$map[] = [['status2', '>', 0]];
$vicount = Db::name('test')->where('test_id', $id)->where(function ($q) use ($map) {
$q->whereOr($map);
})->select();
本文标题:Tp5 Where WhereOr 同时存在
本文链接:https://www.haomeiwen.com/subject/mngkvktx.html
网友评论