Answer the question
In order to leave comments, you need to log in
How to sort a multipart query?
There is the following query, which gets the product entity, with attributes and values.
How to display products in which value_id = 2?
Thank you very much for the help !!!
SELECT `entity`.`entity_name` as `entity_name`,
GROUP_CONCAT(CONCAT(`group`.`title`, '::', CONCAT(`atr`.`attribute_name`, ':' , `val`.`value_name`)) SEPARATOR ':::') as `attributes`
FROM `eav_entities` as `entity`
JOIN `products` as `products` ON (`entity`.`entity_id` = `products`.`entity_id`)
JOIN `eav_attributes` as `atr` ON (`products`.`attribute_id` = `atr`.`attribute_id`)
JOIN `eav_values` as `val` ON (`products`.`value_id` = `val`.`value_id`)
JOIN `group_attributes` as `group` ON (`atr`.`group_id` = `group`.`group_id`)
WHERE `products`.`cat_id` = '9'
GROUP BY `entity`.`entity_name`
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question