[英]Magento issue with external mod “Integrity constraint violation: 1052 Column 'created_at' in where clause is ambiguous”
[英]Mysql error: violation: 1052 Column 'created_at' in where clause is ambiguous'
我遇到了问题:
违反完整性约束:1052 where子句不明确的列“ created_at”
但是表sales_flat_order_grid
具有created_at
列
SELECT DISTINCT main_table.*,
blacklist.entity_id AS marked
FROM sales_flat_order_grid AS main_table
LEFT JOIN (SELECT main_table.*
FROM plugincompany_blacklist_item AS main_table
WHERE ( order_id != '0' )
GROUP BY order_id) AS blacklist
ON main_table.entity_id = blacklist.order_id
WHERE ( created_at >= '2016-11-03 00:00:00'
AND created_at <= '2016-11-26 23:59:59' )
两个表都有一个created_at子句。 所以mysql不知道该取哪个。 您需要清楚这一点:
WHERE ( main_table.created_at >= '2016-11-03 00:00:00'
AND main_table.created_at <= '2016-11-26 23:59:59' )
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.