<?php

class Online_Category_Model extends CI_Model {

    var $tableName = 'tbl_online_category';

    function getOnlineCategorylist($parent_category) {
        $this->db->where('status', 'active');
        $this->db->where('parent_category', $parent_category);
        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;
    }

}
