load->database(); $this->load->library('session'); } #--------------------------------------------------------------------------- # PURPOSE : list # CREATE : 2018-04-30 #--------------------------------------------------------------------------- function category_all_list(){ $this->db->where('is_del', 'N'); $this->db->from('category'); $this->db->order_by('display_sort', 'asc'); $this->db->order_by('reg_date', 'desc'); $res = $this->db->get(); $row = $res->result_array(); return $row; } #--------------------------------------------------------------------------- # PURPOSE : list - total count # CREATE : 2018-04-30 #--------------------------------------------------------------------------- function category_list_total_count(){ $this->db->where('is_del', 'N'); $this->db->from('category'); $row = $this->db->count_all_results(); return $row; } #--------------------------------------------------------------------------- # PURPOSE : select # CREATE : 2018-04-30 #--------------------------------------------------------------------------- function category_select($idx){ $this->db->where('is_del', 'N'); $this->db->where('idx', $idx); $this->db->from('category'); $res = $this->db->get(); $row = $res->row_array(); return $row; } } ?>