我有这个SQL查询来获取所有Magento类别。使用SQL查询获取所有Magento类别
SELECT DISTINCT
cc.entity_id AS id,
cc.`value` AS path,
cc1.`value` AS `NAME`,
cce.`level`,
cce.parent_id
FROM
catalog_category_entity_varchar cc
JOIN catalog_category_entity_varchar cc1 ON cc.entity_id = cc1.entity_id
JOIN eav_entity_type ee ON cc.entity_type_id = ee.entity_type_id
JOIN catalog_category_entity cce ON cc.entity_id = cce.entity_id
WHERE
cc.attribute_id = '57'
AND cc1.attribute_id = '41'
AND ee.entity_model = 'catalog/category'
这将返回所有类别,除了我从Magento后端创建一个新的类别,但没有显示。
该类别已发布,并且中没有产品。 以下图片来自catalog_category_entity_varchar
表。
entity_id = 449
显示了当我运行该查询,因为它有attribute_id = 57 and 41
但我说的entity_id = 452
未显示,因为它没有attribute_id = 57
。
我想问问Magento专家,attribute_id = 57
属于什么?以及如何修复此查询以获取所有类别? PS 我想纯粹的SQL查询,没有Magento代码!
我想要一个SQL查询不是magento代码 – Umair
我没有CODE访问该网站,只有后端访问.... – Umair
从哪个表?我可以发布它,如果你告诉我表 – Umair