我有这个代码
function myfunction($filter, $connection)
{
$result = false;
$queryresult = mysqli_query($connection, "SELECT field1 FROM table1 WHERE field2 = '$filter'");
if ($queryresult && mysqli_num_rows($queryresult) >= 1) {
$row = mysqli_fetch_array($queryresult);
$result = $row['field1'];
mysqli_free_result($queryresult);
}
return $result;
}
如果我删除mysqli_free_result($ queryresult),该功能还可以,但是出了什么问题呢?