문제

I want to get disabled products id's and products price in magento 2 by using SQL Query ?

By using this i'm getting disabled product but how to get price for that products.

SELECT entity_id FROM `catalog_product_entity_int`
WHERE attribute_id = (
SELECT attribute_id FROM `eav_attribute`
WHERE `attribute_code` LIKE 'status'
) AND `catalog_product_entity_int`.value = 2
도움이 되었습니까?

해결책

Try this:

SELECT entity_id, value as price from catalog_product_entity_decimal
WHERE entity_id IN (SELECT entity_id FROM `catalog_product_entity_int`
WHERE attribute_id = (
SELECT attribute_id FROM `eav_attribute`
WHERE `attribute_code` LIKE 'status'
) AND `catalog_product_entity_int`.value = 2) AND attribute_id = 77;
라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 magento.stackexchange
scroll top