问:您能帮忙将过时的函数查询转换为mysqli吗?
函数query($ querystring)
{
$ this-> querytext = $ querystring;
$ this-> query_id = mysql_query($ this-> querytext,$ this-> conn);
$ this-> errno = erroInfo($ this-> conn);
$ this-> error = mysql_error($ this-> conn);
if($ this-> query_id)
{
if(strtolower(substr(trim($ this-> querytext),0,6))=='select'){
$ this-> rows = mysqli_result :: $ num_rows($ this -> query_id);
} else {
$ this-> rows = 0;
}
$ this-> row = 0;
$ this-> rows = 0;
$ this-> row = 0;
$ this-> halt(“查询失败!”);
}
}
}
答:您可以将mysql_query更改为mysqli_query,如果这不起作用,则还必须在新的mysqli中建立连接。希望这个帮助和工作