num_rows() function does not work - Printable Version +- CodeIgniter Forums (https://forum.codeigniter.com) +-- Forum: Using CodeIgniter (https://forum.codeigniter.com/forumdisplay.php?fid=5) +--- Forum: Libraries & Helpers (https://forum.codeigniter.com/forumdisplay.php?fid=11) +--- Thread: num_rows() function does not work (/showthread.php?tid=62501) |
num_rows() function does not work - swand - 07-22-2015 Hello Community, Following is a code example. Code: $this->db->select('*'); If I print_r($query) then num_rows, then it shows empty. Please guide. Regards, Sam RE: num_rows() function does not work - CroNiX - 07-22-2015 Does this? Code: $query = $this->db (get the result array first) RE: num_rows() function does not work - mwhitney - 07-22-2015 (07-22-2015, 10:00 AM)swand Wrote: $query->num_rows is not the same thing as $query->num_rows(), and $query->num_rows generally will be empty until you've called $query->num_rows() or some result method on $query. If $query->num_rows() does not work (as opposed to $query->num_rows), what database driver are you using? |