Answer the question
In order to leave comments, you need to log in
How to merge request fields?
I will give as an example a piece of code that combines a group of attributes with the attributes and values themselves into one line.
SELECT
`entity`.`entity_name` as `entity_name`,
GROUP_CONCAT(CONCAT(`group`.`title`, '-', CONCAT(`atr`.`attribute_name`, ':' , `val`.`value_name`))) as `attribute`
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`)
GROUP BY `entity`.`entity_name`
Answer the question
In order to leave comments, you need to log in
It is possible like this:
SELECT
`entity`.`entity_name`,
`group`.`title`,
`atr`.`attribute_name`,
`val`.`value_name`
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`);
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question