我是CI新手,从文档中我已经放了代码,但我仍然得到一个错误…
致命错误:调用未定义的方法CI_DB_mysqli_result::where(C: ' xampp '根' Nalanda_Library '程序' ' SuperUserlogin.php模型在第8行我的模型代码是这样的
class SuperUserLogin extends CI_Model{
public function checkinglogin($username,$password){
$password = md5($password);
$username;
$array=array('admin_username'=>$username,'admin_password'=>$password);
$row=$this->db->get('admin')
->where($array);
if($row->num_rows()){
return $row->row->admin_user_id();
}
}
}
使用CI的get_where()
方法
$query = $this->db->get_where('mytable', array('id' => $id), $limit, $offset);