Answer the question
In order to leave comments, you need to log in
How to combine query conditions in query builder in yii2?
(new Query)
->select('*')
...
->andWhere(['<', 'time', new Expresion('NOW()')])
->andWhere(['<', 'rating', '5']);
...
->andWhere([
['<', 'time', new Expresion('NOW()')],
['<', 'rating', '5']
]);
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question