load->database(); } public function get_all() { $query = $this->db->get('genre'); return $query->result_array(); } public function get_by_game($game_id) { $this->db->select('genre.*'); $this->db->from('genre'); $this->db->join('game_genre', 'game_genre.genreId = genre.id'); $this->db->where('game_genre.gameId', $game_id); $query = $this->db->get(); return $query->result_array(); } }