load->database(); } public function find($alias = true) { return $this->db->from($this->table. ($alias ? ' cmt' : '')); } public function findById($commentId) { return $this->db->where('idx', $commentId)->get($this->table)->row(); } public function findByContentTypeAndContentId($type, $id) { return $this->db->from($this->table. ' c') ->where('content_type', $type) ->where('content_idx', $id); } }