【发布时间】:2014-09-19 06:38:05
【问题描述】:
我有一个查询要选择所有与某个类别无关的产品。 这里查询:
SELECT cpe.entity_id, cpe.sku
FROM catalog_product_entity as cpe
LEFT JOIN catalog_category_product as ccp
on cpe.entity_id = ccp.product_id
WHERE category_id IS NULL
现在我会看到属性 visibility 的值(目录、搜索、目录和搜索,单独不可见)
此属性值在此表上:catalog_productentity_ind,其中属性 id 为 89。
SELECT *
FROM `catalog_product_entity_int`
WHERE `attribute_id` =89
现在我将显示类别为 NULL 的属性值 (attribute_id=89),如下例所示:
产品编号 |产品 SKU |属性值 (id 89) |类别(全部为 NULL)
我该怎么做?
【问题讨论】: