gpt4 book ai didi

php - mysqli_result 无法将 MySQL 转换为 mysqli

转载 作者:搜寻专家 更新时间:2023-10-31 21:32:23 24 4
gpt4 key购买 nike

<分区>

我正在将我的旧 MySQL 转换为 mysqli 但遇到了这个问题 mysqli 结果不起作用。上网查了下发现功能变了,mysqli结果有没有等价的?

这是我的错误

Fatal error: Call to undefined function mysqli_result() in C:\xampp\htdocs\bear_mysqli\functions\users.php on line 153

function user_exists($con,$username)
{
$username = sanitize($con,$username);

$query = mysqli_query($con,"SELECT COUNT(`user_id`)FROM `users` WHERE `username` = '$username'");

return (mysqli_result ($query, 0)== 1) ? true : false;
}

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com