Welcome Guest, Not a member yet? Register   Sign In
num_rows problem
#1

[eluser]billie joe[/eluser]
actually im new here in CI i use to work in native php language im kind a confused because of this error.

Fatal error: Call to a member function num_rows() on a non-object in
application\controllers\JsonController.php on line 79


and this is the code:

$UserModel = New UserModel();
$UserModel = Doctrine_Query::create()
->from('UserModel u')
->where('u.id = :id' ,array(':id' => '1'))
->fetchOne();

$data['query'] = $UserModel->MusicModel;
if ($data->num_rows() > 0)
{
return $data->result_array();
}
return FALSE;


print_r($data);
#2

[eluser]xwero[/eluser]
$data[‘query’]




Theme © iAndrew 2016 - Forum software by © MyBB