Fatal error: Call to a member function fetch_array() on a non-object in 62 line,该如何处理
程序员文章站
2022-06-01 10:21:52
...
Fatal error: Call to a member function fetch_array() on a non-object in 62 line
if($_POST[admin_user]!="" || $_POST[admin_pass]!="")
{
$conn=new mysqli("localhost","root","db_wlgl);
$conn->query("set names gb2312");
$admin_user=$_POST[admin_user];
$admin_pass=($_POST[admin_pass]);
$sql=$conn->query("call admin_regs('".$admin_user."','".$admin_pass."')");
$res=$sql->fetch_array(MYSQL_BOTH); //62行
if($res!=NULL){
session_register("admin_user");
session_register("admin_pass");
echo "";
}else{
echo "";
}
}
?>
------解决思路----------------------
在62行上面 echo $conn->error; 看看
if($_POST[admin_user]!="" || $_POST[admin_pass]!="")
{
$conn=new mysqli("localhost","root","db_wlgl);
$conn->query("set names gb2312");
$admin_user=$_POST[admin_user];
$admin_pass=($_POST[admin_pass]);
$sql=$conn->query("call admin_regs('".$admin_user."','".$admin_pass."')");
$res=$sql->fetch_array(MYSQL_BOTH); //62行
if($res!=NULL){
session_register("admin_user");
session_register("admin_pass");
echo "";
}else{
echo "";
}
}
?>
------解决思路----------------------
在62行上面 echo $conn->error; 看看
相关文章
相关视频
推荐阅读
-
php连接mysql出错:Fatal error: Call to undefined function mysql_connect(),该如何处理
-
Fatal error: Call to a member function fetch_array() on a non-object in 62 line
-
Fatal error: Call to a member function fetch_array() on a non-object in 62 line
-
php连接mysql出错:Fatal error: Call to undefined function mysql_connect(),该如何处理
-
Fatal error: Call to a member function fetch_array() on a non-object in 62 line,该如何处理
-
php连接mysql出错:Fatal error: Call to undefined function mysql_connect(),该如何处理
-
Fatal error: Call to a member function fetch_array() on a non-object 错误
-
Fatal error: Call to a member function fetch_array() on a non-object 错误