public function getAutoComplete($filter_data = array())
{
if (is_array($filter_data) and !empty($filter_data)) {
//selecting all records from the menu and categories tables.
$this->db->from('menus');
$this->db->where('menu_status', '1');
if (!empty($filter_data['menu_name'])) {
$this->db->like('menu_name', $filter_data['menu_name']);
}
$query = $this->db->get();
$result = array();
if ($query->num_rows() > 0) {
$result = $query->result_array();
}
return $result;
}
}