<?php $query->where('status = 1'); $query->where('status = :status', [':status' => $status]); $query->where('status = :status')->addParams([':status' => $status]); $query->where([ 'status' => 10, 'type' => null, 'id' => [4, 8, 15], ]); $query->where(['and', 'id=1', 'id=2']); $query->where(['and', 'type=1', ['or', 'id=1', 'id=2']]); $query->where(['between', 'id', 1, 10]); $query->where(['not between', 'id', 1, 10]); $query->where(['in', 'id', [1, 2, 3, 4, 5]]); $query->where(['not in', 'id', [1, 2, 3, 4, 5]]); $query->where(['like', 'name', 'hello']); $query->where(['like', 'name', ['hello', 'world']]); $query->where(['>', 'age', 10]) $query->andWhere(['like', 'title', 'hello-world']); $query->orWhere(['like','name','LuisEdware']); $query->filterWhere(['name' => $name, 'email' => $email]); $query->andFilterWhere(['!=', 'id', 1]); $query->orFilterWhere(['status' => 2]); $query->andFilterCompare('name', 'John Doe');
|