<?php

class Setting_Model extends CI_Model {

    function __construct() {
        // Call the Model constructor
        parent::__construct();
        $this->load->database();
    }
    public function insertHoliday($data) {
        // Use Query Builder for portability
        return $this->db->insert($this->table, $data);
    }

    public function get_all() {
    $query = $this->db
                  ->order_by('holiday_date', 'ASC')
                  ->get('holidays'); // Table name
    return $query->result_array();
}
}

?>