谁一开始就是大神?

Yii2.0andFilterWhere用法[2.0]

$query->andFilterWhere(['not like', 'name', $this->name])
    ->andFilterWhere(['like', 'keywords', $this->keywords])
    ->andFilterWhere(['like', 'desc', $this->desc])
    ->andFilterWhere(['like', 'thumb', $this->thumb])
return $dataProvider;

如果是“ = ”,那么like要改为什么呢?

直接改成=就可以
直接把like改为 = ,就行了吧
>where(['last_name' => 'Smith'])

赞(0) 打赏
未经允许不得转载:菜鸟之家 » Yii2.0andFilterWhere用法[2.0]

评论 抢沙发

登录

找回密码

注册