-2
我收到此錯誤調用未定義功能mysql_result(),而從mysql_result更改爲mysqli_result致命錯誤:未捕獲的錯誤:
function f_exists($f_uname) {
$f_uname = sanitize($f_uname);
$conn = @mysqli_connect('localhost','root','','swift') or die($connect_error);
$query = mysqli_query($conn,"SELECT COUNT(`f_id`) FROM `flight_users` WHERE `f_uname`= '$f_uname'") or die(mysqli_error($conn));
//here is the problem
return (mysql_result($query, 0) == 1) ? true : false;
}
您不能混合和匹配'mysql_ *'和'mysqli_ *'apis。你使用PHP 7嗎?如果是這樣'mysql_ *'api已被完全刪除。 –
我可以解決你的問題嗎? – rbr94