在模块的管理网格中,我正在使用此代码来获取集合并将其按客户ID分组
$collection = Mage::getModel('referafriend/statistics')->getCollection();
$collection->getSelect()->group('entity_id');
$this->setCollection($collection);但是在这里,我必须针对每个客户使用渲染器和过滤器功能来处理客户信息,例如姓名和电子邮件entity_id。我想将客户模型与模块表一起加入。为此,我写了这段代码
 $collection = Mage::getModel('customer/customer')->getCollection()
 ->addNameToSelect();
$collection->getSelect()->join(array('refer' => 'table_name'),'refer.entity_id = e.entity_id'
          ); 
   $collection->getSelect()->group('entity_id'); 
   $collection->addAttributeToSelect('*');但这给了我这个错误
SQLSTATE[23000]: Integrity constraint violation: 1052 Column 'entity_id' in group statement is ambiguous任何帮助将不胜感激。
                
                1
              
                  它应该是-> group('e.entity_id');
                
                
                  
                    —
                    阿米特·贝拉
                    
                  
                
              
                  您应该将此添加为答案,并详细说明为什么需要
                
                  
                    —
                    Jonathan Hussey 2014年
                    
                  
                
              e.
                
                  对不起这个愚蠢的错误。@AmitBera感谢您的帮助,请将其添加为答案,以便可以关闭问题。
                
                
                  
                    —
                    哈里斯2014年