ok
Direktori : /home2/selectio/www/geniusgroove.in/crm/api/application/models/ |
Current File : //home2/selectio/www/geniusgroove.in/crm/api/application/models/Category_model.php |
<?php if (!defined('BASEPATH')) { exit('No direct script access allowed'); } class Category_model extends CI_Model { public function __construct() { parent::__construct(); } public function get($id = null) { $this->db->select()->from('categories'); if ($id != null) { $this->db->where('id', $id); } else { $this->db->order_by('id'); } $query = $this->db->get(); if ($id != null) { return $query->row_array(); } else { return $query->result_array(); } } }