错误提示大概是这样的
Integrity constraint violation: 1052 Column 'increment_id' in where clause is ambiguous
使用 代码 'filter_index'=>'main_table.increment_id', 可以解决这个问题
解决方法例子代码如下:
$this->addColumn('real_order_id', array(
'header'=> Mage::helper('sales')->__('Order #'),
'width' => '80px',
'type' => 'text',
'index' => 'increment_id',
'filter_index'=>'main_table.increment_id',
));
本文介绍了一种常见的MySQL错误——“IntegrityConstraintViolation:1052 Column 'increment_id' in where clause is ambiguous”,并提供了解决方案。通过指定表名前缀,如使用 'filter_index'=>'main_table.increment_id',可以有效避免该问题。
205

被折叠的 条评论
为什么被折叠?



