Welcome Guest, Not a member yet? Register   Sign In
num_rows() function does not work
#1

Hello Community,

Following is a code example.

Code:
       $this->db->select('*');
       $this->db->distinct();
       $query = $this->db->get('products');
       /*does not work*/
       echo $query->num_rows(); // this line does not work
       echo count($query->result_array()); // this line works

If I print_r($query) then num_rows, then it shows empty.

Please guide.

Regards,
Sam
Reply


Messages In This Thread
num_rows() function does not work - by swand - 07-22-2015, 10:00 AM
RE: num_rows() function does not work - by CroNiX - 07-22-2015, 10:43 AM



Theme © iAndrew 2016 - Forum software by © MyBB