默认打印where条件如下:
[“where”] => array(1) {
[0] => array(2) {
[0] => string(3) “exp”
[1] => object(think\db\Expression)#38 (1) {
[“value”:protected] => string(8) “cid=’29′”
}
}
}
重组where条件:
public function yunqikdsIndexAjaxQueryBegin(&$params){
if($params[‘tablename’] == ‘creative_baoming’) {
$params[‘where’][] = Db::raw(“audit_status != 0”);
// dump($params[‘where’]);die();
}
}
这样不会覆盖上面的条件