Код: Выделить всё
...
$filterConditions = [
...
[
'and',
['or', ['between', 'product_attributes.value', 3, 4], ['product_attributes.value' => 5]],
['product_attributes.attribute_id' => 21182]
],
...
];
...
foreach ($filterConditions as $fCondition) {
$query->andWhere($fCondition);
}
...
Код: Выделить всё
... WHERE ((`product_attributes`.`value` BETWEEN 3 AND 4) OR (`product_attributes`.`value`=5)) AND (`product_attributes`.`attribute_id`=21182) ...
Код: Выделить всё
... WHERE (((`product_attributes`.`value` BETWEEN 3 AND 4) OR (`product_attributes`.`value`=5)) AND (`product_attributes`.`attribute_id`=21182)) ...