$query = $this->db->select('*')->from($this->table)->order_by($sql);
The CI documentation isn't clear about this and I'm not entirely sure how this should work… if I have this query and need to check the num_rows() AND get results in an array. How would I do that?
When I use $this->db->select('*')->from($this->table)->order_by($sql)->get();
I'm not able to check num_rows()
Ideally I'd use result_array() to get the results in an array.
Best Answer
Try to use this