Answer the question
In order to leave comments, you need to log in
How to generate parameters for a request?
There is a selection condition:
$query->andFilterWhere(['or',
['like', 'tags', 'tag1'],
['like', 'tags', 'tag2']
]);
['like', 'tags', 'tag1'],
['like', 'tags', 'tag2']
Answer the question
In order to leave comments, you need to log in
As an option
foreach($tags as $tag) {
$conditions[] = ['like', 'tags', $tag];
}
$query->andFilterWhere(array_merge(['or'], $conditions));
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question