GROUP_CONCAT(CONCAT(`caption`, '=' , `value`)) as all_fields
and ( `class_table2`.caption = tip_field and `class_table2`.value >= 157)
and (class_table2.caption, class_table2.value) in
(('tip_field', '1'), ('tip_field', '2'), ('text', 'test'), ('text', 'test2'))
не работает. Как эту проблему решить можно? select sum(couaant) from (
SELECT class_a.id, (select count(*) from class_a where class_a.id = `class_p`.p_id) as couaant
FROM class_a
LEFT JOIN `class_p`
ON `class_a`.id = `class_p`.p_id
WHERE class_a.cat_id = 1
AND (`caption`,`value`) IN (('type','1'), ('type_2','2'))
GROUP BY class_a.id
HAVING COUNT(DISTINCT caption, value) = 2
)
Uint8Array(200553) [255, 216, 255, 224, 0, 16, 74, 70, 73, 70, 0, 1, 1, 1, 0, 96, 0, 96, 0, 0, 255, 219, 0, 67, 0, 2, 2, 2, 2, 2, 1, 2, 2, 2, 2, 3, 2, 2, 3, 3, 6, 4, 3, 3, 3, 3, 7, 5, 5, 4, 6, 8, 7, 9, 8, 8, 7, 8, 8, 9, 10, 13, 11, 9, 10, 12, 10, 8, 8, 11, 15, 11, 12, 13, 14, 14, 15, 14, 9, 11, 16, 17, 16, 14, 17, 13, 14, 14, 14, 255, 219, 0, 67, 1, 2, 3, 3, 3, 3, 3 ........