我收到此错误:
警告:mysqli_free_result() 期望参数 1 为 mysqli_result,布尔值在
在我的代码中,我有:
// Perform it
$result = mysqli_query($connection, $query);
if ($result) {
// Success
echo "<h1>Uploaded results to database</h1>";
} else {
echo "FAILURE: Couldn't perform query on database: " . mysqli_error($connection);
}
// Release
mysqli_free_result($result);
我读过的大多数其他解决方案都说这是因为查询可能失败了,但事实并非如此,因为我测试了查询返回的数据以查看它是否存在,并且确实存在,因此<h1>
标签被执行。那我怎么放不出来?我认为我应该总是在处理完返回的数据后发布它?