コード例 #1
0
ファイル: Abstract.php プロジェクト: xiaoguizhidao/beut
 protected function _initSelect()
 {
     $temp = parent::_initSelect();
     if (is_null($this->childMode)) {
         return $temp;
     }
     /** @var $resource Ess_M2ePro_Model_Mysql4_Component_Parent_Abstract */
     $resource = $this->getResource();
     $componentTable = $resource->getChildTable();
     $componentPk = $resource->getChildPrimary();
     $this->getSelect()->join(array('second_table' => $componentTable), "`second_table`.`" . $componentPk . "` = `main_table`.`id`");
     $this->getSelect()->where("`main_table`.`component_mode` = '" . $this->childMode . "'");
     return $temp;
 }