Return all uploads if either the start or the count is not set.
This commit is contained in:
parent
f15def54cc
commit
80fcde445e
1 changed files with 6 additions and 1 deletions
|
@ -34,7 +34,12 @@ class Fileupload extends CI_Model {
|
|||
}
|
||||
|
||||
function get_uploads($start = false, $count = false) {
|
||||
$query = $this->db->get('uploads', $count, $start);
|
||||
if($start != false && $count != false) {
|
||||
$query = $this->db->get('uploads', $count, $start);
|
||||
} else {
|
||||
$query = $this->db->get('uploads');
|
||||
}
|
||||
|
||||
|
||||
return $query->result();
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue