The following code produces the exception: mysqli_result::close(): Couldn't fetch mysqli_result
$res2 = $mysqli->query(
"SELECT DISTINCT p.value FROM `users` AS u
LEFT OUTER JOIN `profile_values` AS p ON u.uid=p.uid
WHERE u.`status` = 1
AND p.`fid` = 11
AND p.`value` != ''
");
if($res2){
// Cycle through results, insert in to data array
while ($row = $res2->fetch_assoc()) {
// Santize data to be just numberic
$data2[] = preg_replace("/[^0-9]/", "", $row["value"]);
}
$res->close();
}
But, if I execute the query via phpMyAdmin, I get a result set of over 20 rows.
I've googled this, and I found a couple of discussions around the web from 10 yrs ago! (and the threads weren't helpful to my plight)
Thank you!