Magento2 常见数据表查询

1. 下面是常见的Magento2查询语句

1.1 根据产品id查询目录价格规则:

SELECT `catalogrule_product_price`.`product_id`, `catalogrule_product_price`.`rule_price` FROM `catalogrule_product_price` WHERE (rule_date = '2021-08-11') AND (website_id = '1') AND (customer_group_id = 0) AND (product_id IN('1782'));

1.2 根据产品id查询产品描述

 select catalog_product_entity_text where entity_id = 505 \G;

1.3 根据产品id查询产品的原价以及特价

select * from  catalog_product_entity_decimal where entity_id = 1782\G;

You May Also Like