#我这里catalog_product_entity_int表attribute_id=96表示产品的状态(status)
#
select t1.sku,t2.value as status,t3.qty from catalog_product_entity as t1
left join catalog_product_entity_int as t2 on t1.entity_id=t2.entity_id
left join cataloginventory_stock_item as t3 on t3.product_id=t1.entity_id
where t2.attribute_id=96[Magento SQL] 返回产品SKU,Stutus(上下架状态)和库存
最新推荐文章于 2023-08-04 21:03:41 发布
本文介绍了一种通过SQL查询来获取特定属性ID对应的产品状态及其库存数量的方法。使用了catalog_product_entity, catalog_product_entity_int及cataloginventory_stock_item三个表进行联表查询。
1255

被折叠的 条评论
为什么被折叠?



