I have the following lines in CodeIgniter : Line 217
if ($query->num_rows() == 0)
{
$this->sess_destroy();
return FALSE;
}
Displays the following error:
Fatal error: Call a member function num_rows () on a non-object in file.php on line 217
What can it be? Previously it worked perfectly ... I just reinstalled the machine and now it has this problem. I'm using CodeIgniter and EasyPHP for testing.
If I change the line by if (count($query) == 0)
, it will work fine, however, so I would have to change everywhere I use num_rows
, and inside the server it works right.