class Example_model extends CI_Model {
function __construct()
{
}
public function get($table, $id = false)
{
if ($id)
{
$this->db->where('id', $id);
}
$query = $this->db->get($table);
if($query->num_rows() > 0)
{
return $query->result_array();
}
return false;
}
// etc.
}