Num_rows Error - Printable Version +- CodeIgniter Forums (https://forum.codeigniter.com) +-- Forum: Archived Discussions (https://forum.codeigniter.com/forumdisplay.php?fid=20) +--- Forum: Archived Development & Programming (https://forum.codeigniter.com/forumdisplay.php?fid=23) +--- Thread: Num_rows Error (/showthread.php?tid=25184) |
Num_rows Error - El Forum - 12-03-2009 [eluser]Arasoi[/eluser] Ok folks, I have poked around for a bit know and can not seem to find a post helping me with my issue. Now I know it is something retarded I have done but baring that in mind it is what also makes me unable to see it I get this error : Code: Fatal error: Call to a member function num_rows() on a non-object From this code : Code: function con_getfieldchecks($Start,$PageSize,$EID = NULL) If I comment out the Code: $output['totalCount'] = $query->num_rows(); Num_rows Error - El Forum - 12-03-2009 [eluser]clip[/eluser] Would start with trying this: Code: $this->db->select(); Code: $this->db->select('*'); Code: $this->db->count_all_results('table_name'); Num_rows Error - El Forum - 12-03-2009 [eluser]Arasoi[/eluser] Found it sort of. I removed the: Code: $this->db->select(); Per your suggestion and it did not work. then I noticed a slight error on my part to fix that should not have mattered but seems it did. I changed the table name from : Code: $query = $this->db->get('fc_AddressRequests'); Code: $query = $this->db->get('fc_AddressRequests_View'); And all worked well, even though the table that the view is built from is the same name minus the "_View" bit. Either way thank you for the help it solved my dilemma if in a round about way. |