$Informationsystem_Controller_Show
->informationsystemItems()
->queryBuilder()
->leftJoin('informationsystem_item_properties', 'informationsystem_items.informationsystem_id', '=', 'informationsystem_item_properties.informationsystem_id')
->leftJoin('property_value_ints', 'informationsystem_items.id', '=', 'property_value_ints.entity_id',
array(
array('AND' => array('informationsystem_item_properties.property_id', '=', Core_QueryBuilder::expression('`property_value_ints`.`property_id`')))
)
)
// Свойство 1
->where('informationsystem_item_properties.property_id', '=', 73)
// Значание дополнительного свойства
->where('property_value_ints.value', '=', 1)
->open()
// Идентификатор дополнительного свойства
->where('informationsystem_item_properties.property_id', '=', 76)
// Значание дополнительного свойства
->where('property_value_ints.value', '<=', $largeCost)
->where('informationsystem_item_properties.property_id', '=', 76)
// Значание дополнительного свойства
->where('property_value_ints.value', '>=', $smallCost)
->close();
Цитата:
Блоки с указанием св-ва и значения идут через OR!
// Идентификатор дополнительного свойства
->where('informationsystem_item_properties.property_id', '=', 19)
// Значание дополнительного свойства
->where('property_value_ints.value', '=', '123')
с этим не понял
Цитата:
далее используете having с count, где значение равно количеству задействованных свойств, пример в соседней теме
добавил
->having('COUNT(informationsystem_item_properties.informationsystem_id)', '=', 1)
опять ничего
Попробовал Core_DataBase::instance()->getLastQuery();
вывело
SELECT
*
FROM `informationsystem_groups`
WHERE `informationsystem_groups`.`informationsystem_id` = '17' AND `parent_id` = 0 AND `informationsystem_groups`.`deleted` = 0
явно что то не то(((