num_rows problem - Printable Version +- CodeIgniter Forums (https://forum.codeigniter.com) +-- Forum: Archived Discussions (https://forum.codeigniter.com/forumdisplay.php?fid=20) +--- Forum: Archived Libraries & Helpers (https://forum.codeigniter.com/forumdisplay.php?fid=22) +--- Thread: num_rows problem (/showthread.php?tid=18053) |
num_rows problem - El Forum - 04-23-2009 [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); num_rows problem - El Forum - 04-23-2009 [eluser]xwero[/eluser] $data[‘query’] |