load->database(); } public function findById($id) { return $this->db->from($this->table . ' l')->where_in('l.idx', $id) ->join('partner p', 'l.partner_idx=p.idx', 'left') ->select('p.idx editorId, p.partner_img editorImg, p.main_img editorMainImg, p.partner_name editorName, p.partner_intro editorIntro, l.title, l.head_title, l.sub_title, l.content, l.category_idx categoryId, l.idx, l.main_img mainImg, l.hit_count views, l.like_count likes, l.comment_count comments, l.*'); } public function findByEditorId($editorId) { return $this->db->from($this->table . ' l')->where_in('l.partner_idx', $editorId) ->join('partner p', 'l.partner_idx=p.idx', 'left') ->select('p.idx editorId, p.partner_img editorImg, p.main_img editorMainImg, p.partner_name editorName, p.partner_intro editorIntro, l.title, l.head_title, l.sub_title, l.content, l.category_idx categoryId, l.idx, l.main_img mainImg, l.hit_count views, l.like_count likes, l.comment_count comments, l.*'); } public function findAll($categoryId = null) { return $this->db->from($this->table . ' l'); } }