<?php

/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */

/**
 * Description of Range_modal
 *
 * @author mahed
 */
class Range_modal extends CI_Model {

    public function __construct() {
        $this->load->database();
    }
    
     public function exit_range($username) {
        $this->db->select();
        $this->db->from('z_executive_range');
        $this->db->where('executive', $username);
        $query = $this->db->get();
        $farmer = $query->first_row('array');
        return $farmer;
    }
    
    public function add_range($data) {
        $this->db->insert('z_executive_range', $data);
    }
    
     public function delete_range($data) {
        $this->db->delete('z_executive_range', $data);
    }
}
