load->database(); } public function findById($id) { return $this->db->where('idx', $id)->get($this->table)->row(); } public function findByContentTypeAndContentId($type, $id) { return $this->db->from($this->table. ' ll') ->where('content_type', $type) ->where('content_idx', $id); } }