public function email_check()
{
$this->form_validation->set_message('email_check', 'The %s '.$this->input->post('usr_email').' is already exist');
$this->db->where('usr_email', $this->input->post('usr_email'));
$query = $this->db->get('users');
if ($query->num_rows()>0)
return false;
else
return true;
}
(!) Fatal error: Call to a member function num_rows() on a non-object in C:\wamp\www\application\controllers\users.php on line 264致命错误呼叫号码功能节数行
调用堆栈
# Time Memory Function Location
1 0.0005 266584 {main}() ..\index.php:0
2 0.0015 324704 require_once('C:\wamp\www\\system\core\CodeIgniter.php') ..\index.php:202
3 0.0440 4030256 call_user_func_array:{C:\wamp\www/\system\core\CodeIgniter.php:359} () ..\CodeIgniter.php:359
4 0.0440 4031120 Users->save_registration() ..\CodeIgniter.php:359
5 0.0440 4044000 CI_Form_validation->run() ..\users.php:302
6 0.0450 4056264 CI_Form_validation->_execute() ..\Form_validation.php:341
7 0.0450 4057600 Users->email_check() ..\Form_validation.php:593
检查这个http://stackoverflow.com/questions/20751899/call-to-a-member-function-num-rows-on-a-non-object –
@kiran这有没有关系你的链接,因为他根本不使用结果... – sintakonte
你能解释一下吗? –