我在管理面板订单网格中添加了三个新列(社区版本 1.7.0.2)但现在搜索不起作用。当我按Purchased On
日期搜索时,它显示以下错误消息。
SQLSTATE[23000]: Integrity constraint violation: 1052 Column 'created_at' in where clause is ambiguous
我的收藏如下。
$collection = $observer->getOrderGridCollection();
$collection->getSelect()
->joinLeft('sales_flat_order_payment', 'main_table.entity_id = sales_flat_order_payment.parent_id','method')
->joinLeft('customer_entity', 'main_table.customer_id = customer_entity.entity_id','email')
->joinLeft('sales_flat_order_item', 'main_table.entity_id = sales_flat_order_item.order_id','name');
$collection->getSelect()->group('main_table.entity_id');
请问有什么建议吗?