Call to a member function num_rows() on a non-object
- by Patrick
I need to get the number of rows of a query (so I can paginate results).
As I'm learning codeigniter (and OO php) I wanted to try and chain a -num_rows() to the query, but it doesn't work:
//this works:
$data['count'] = count($this->events->findEvents($data['date'], $data['keyword']));
//the following doesn't work and generates
// Fatal…