完整性约束违规:1052 magento

时间:2016-07-21 11:03:50

标签: magento

安装后FME分层导航https://github.com/kirchbergerknorr/fma_layerednavigation进行以下错误

SQLSTATE [23000]:违反完整性约束:1052列' final_price'在where子句不明确的情况下,查询为:SELECT MIN(price_idx.min_price)AS min_value,MAX(price_idx.min_price)AS max_value FROM catalog_product_entity AS e  INNER JOIN catalog_category_product_index AS cat_index ON cat_index.product_id = e.entity_id AND cat_index.store_id = 1 AND cat_index.visibility IN(2,4)AND cat_index.category_id =' 10'  INNER JOIN catalog_product_index_price AS price_index ON price_index.entity_id = e.entity_id AND price_index.website_id =' 1' AND price_index.customer_group_id = 0  LEFT JOIN catalog_product_index_price AS price_idx ON price_idx.entity_id = e.entity_id WHERE((1 = 1)OR(final_price为NULL))AND((1 = 1)OR(final_price为NULL))AND ((1 = 1)OR(final_price为NULL))AND((1 = 1)OR(final_price为NULL))AND((1 = 1)OR(final_price为NULL))AND((1 = 1)OR( final_price为NULL))AND((1 = 1)OR(final_price为NULL))AND(price_idx.website_id =' 1')AND(price_idx.customer_group_id = 0)LIMIT 36

1 个答案:

答案 0 :(得分:0)

专栏' final_price'是不明智的,因为mysql查询需要知道这个列属于哪个表你必须使用表别名,就像这个price_index.final_price将所有final_price替换为price_index.final_price