<?php
class Commonmodel extends CI_Model{

    function __construct()
    {
        parent::__construct();   
    }

   function get_menu($condition="",$orderby="")
    {
        if(!empty($orderby))
            $this->db->order_by($orderby,'asc');

        if(!empty($condition))
           $this->db->where($condition);
        return $this->db->get('menus');
    }

    function get_county($condition="")
    {
        if(!empty($condition))
           $this->db->where($condition);
        return $this->db->get('regions');
    }

    function get_subcounty($condition="")
    {
        if(!empty($condition))
           $this->db->where($condition);
        return $this->db->get('county');
    }
    
}