DBObj($id); $this->id_individual = intval($id_individual); $this->tblIndividual = $this->db->tblMember; } function _getJoin4Grid() { return " JOIN {$this->db->tblDEmailType} as DEmailType ON DEmailType.id = {$this->tableName}.id_type JOIN {$this->tblIndividual} as Individual ON Individual.id = {$this->tableName}.id_individual LEFT JOIN {$this->db->tblLocation} as Location ON Location.id = Individual.id_location LEFT JOIN {$this->db->tblCompany} as Company ON Company.id = Location.id_company "; } function getSummary() { $listType = $this->getDEmailType4Summary(); $list = array(); foreach ($listType as $k => $v) { $listItem = $this->getList4Grid(array('order_by'=>'added DESC', 'ipp'=>2, 'addonWhere'=>'AND Email.id_type='.intval($v['id']))); $v = array_merge($v, $listItem); $list[] = $v; } return $list; } }