首页 > 学院 > 开发设计 > 正文

[Magento SQL] 查询分类名称,和该分类下关联的所有sku

2019-11-08 20:45:53
字体:
来源:转载
供稿:网友
SELECT t1.entity_id, t1.`level`, t2.`value`, group_concat(t4.sku separator ',') as skus FROM catalog_category_entity AS t1LEFT JOIN catalog_category_entity_varchar AS t2 ON t2.entity_id=t1.entity_idLEFT JOIN catalog_category_PRoduct AS t3 ON t3.category_id=t1.entity_idLEFT JOIN catalog_product_entity AS t4 ON t4.entity_id=t3.product_idWHERE t1.`level`>=2 AND t2.attribute_id=41 AND t2.store_id=0GROUP BY t1.entity_id
发表评论 共有条评论
用户名: 密码:
验证码: 匿名发表