«join» 태그된 질문

1
조인 쿼리와 함께 magento 컬렉션에서 group by를 사용하는 방법
모듈의 관리 그리드 에서이 코드를 사용하여 고객 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' ); …
당사 사이트를 사용함과 동시에 당사의 쿠키 정책개인정보 보호정책을 읽고 이해하였음을 인정하는 것으로 간주합니다.
Licensed under cc by-sa 3.0 with attribution required.