database是在autoload中自动加载的,却报了错误: call to a member function num_rows() on a non-object
代码: $Mobile = $this->input->post('Mobile', TRUE); $query = $this->db->get_where('myTable', array('Mobile' => $Mobile), 1); if(0 < $query->num_rows()) { $resultData = array ( 'result' => '号码已经存在' ); echo json_encode($resultData); }
我在CI的用户指南中看到就是这么写的啊?
|