Код: Выделить всё
$query = ....
foreach ($items as $item) {
$query->andWhere(
['REGEXP', 'product_characteristics', $sectionTitle . '":{[^}]+:"' . $item . '"']
);
}
.....
Код: Выделить всё
other conditions AND (REGEXP ....) AND (REGEXP....) AND (REGEXP.....)
Код: Выделить всё
other conditions AND (REGEXP ....) OR (REGEXP....) OR (REGEXP.....)