YII2 查询语句

find和findOne区别 findONe对ID 返回该ID的数据
find()方法
->select()查找需要返回的字段
->where(‘in’,‘id’,$id)条件,有in,not in, and,not and,between,not between,or 等等
->andwhere()添加多一个条件
->filterWhere()过滤
->andFilterWhere()添加多一个过滤
->limit()分页
->offset()分页
->exists()是否存在
->count()统计
->indexBy()索引
->asArray() 也是以数组形式返回的意思 但是有没它区别好大
YII2 查询语句
用了asArray
YII2 查询语句
->all()或者one 都是返回数组