<?php

class Menu_Category_Model extends CI_Model {

    var $tableName = 'tbl_menu_category';

    function getMenuCategorylist() {
        $this->db->where('status', 'active');
        if ($this->session->userdata('location_id'))
        $this->db->where('province_id', $this->session->userdata('location_id'));
        $query = $this->db->get($this->tableName);
        $result = $query->result_array();
        return $result;
    }

    function getItemCategoryDetail($cat_id) {
        $this->db->where($this->tableName . '.menu_cat_id', $cat_id);
        $query = $this->db->get($this->tableName);
        $result = $query->row_array();
        return $result;
    }

}