EVOLUTION-NINJA
Edit File: Port_model.php
<?php defined('BASEPATH') OR exit('No direct script access allowed'); class Port_model extends CI_Model { public function get_countries() { $query = $this->db->get('countries'); return $query->result(); } public function add_country($country_name) { $data = array( 'country_name' => $country_name ); $this->db->insert('countries', $data); } public function add_port($country_id, $port_name) { $data = array( 'country_id' => $country_id, 'port_name' => $port_name ); $this->db->insert('ports', $data); } }