Запросы у меня создаются примерно такие
WHERE ( ( `modResource`.`deleted` = 0 AND `modResource`.`hidemenu` = 0 AND `modResource`.`published` = 1 ) AND `modResource`.`parent` IN (156,178,179,180,181,182,183,184,185,186,187,188,189,190,191) AND ( ( `TemplateVar`.`name` = 'shape' AND `TVResources`.`value` = 'rectangle' ) AND ( `TemplateVar`.`name` = 'processing_edge' AND `TVResources`.`value` = '10' ) ) )
или
WHERE ( ( `modResource`.`deleted` = 0 AND `modResource`.`hidemenu` = 0 AND `modResource`.`published` = 1 ) AND `modResource`.`parent` IN (156,178,179,180,181,182,183,184,185,186,187,188,189,190,191) AND ( `TemplateVar`.`name` = 'shape' AND `TVResources`.`value` = 'rectangle' ) AND ( `TemplateVar`.`name` = 'processing_edge' AND `TVResources`.`value` = '10' ) )
Каждое поле по отдельности, но не как не вместе