->where(['<>','review',""]) 不等于空
$where = ['newstypeid'=>['$in'=>$categoryIdArr]]; 类似mysql in操作 ($categoryIdArr是数组)
->where(['label'=>['$regex' =>'赞美诗']]) 模糊搜索操作
$where = ['status'=>1,'name'=>['$regex' =>$search]];
多个条件查询
andWhere() orWhere()
查询字段
->select(['title','content','dynasty','author','author_id','id'])
查询表
->from()
查询多条数据和单条数据
->all() ->one()
排序
->orderBy(['newsid' => SORT_DESC,])
限制
->offset(3)从第三条开始
->limit(3)取三条数据