I have the following get_authors_list function in one of my Codeigniter models
function get_authors_list($limit,$offset){ $data = array(); $this->db->select('*')->from('authors')->limit($limit,$offset)->order_by('id','desc'); $query = $this->db->get(); if ($query-> num_rows() > 0){ $data = $query->result_array(); } return $data; $q->free_result(); }
Before upgrading to Codeigniter 2.1.2, I used a call to this method from my controller as
$data['authors'] = $this->author_model->get_authors_list(NULL, 0)
and it worked as expected, but after upgrading to version 2.0.1 it does not work, to make it work, I needed to specify a restriction, as indicated in my function call
$data['authors'] = $this->author_model->get_authors_list(50, 0)
Specifying a NULL constraint doesn't work, why? Am I doing something wrong here? I correctly followed the instructions for updating Codeigniter, but I did not expect this side effect.
Any explanation is appreciated. Thanks!
source share