0
点赞
收藏
分享

微信扫一扫

Jenkins入门

跟着Damon写代码 2024-02-03 阅读 18

->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)取三条数据

举报

相关推荐

0 条评论