Db::name("category")->where(function($query) { $query->where('icon_image', 'neq', "")->whereor('index_image', 'neq', ""); }) ->where(['type'=>'goods']) ->field('name,type,icon_image,index_image,description') ->order("id asc") ->limit(3) ->select();
Thinkphp where whereor 同时使用
关注
打赏