I am having an issue with fetch assoc, it is returning an error saying it expects an object not a boolean but I checked and "results" is an object not a boolean, what could be causing this?
try{
$someSQL = "Call SomeSproc()";
$results = mysqli_query($connection,$someSQL);
}catch(Exception $ex)
{
echo("Error: " . __LINE__ . " " .$ex);
}
print_r($results);//says I have 14 results
echo gettype($results);//prints object
while($result = mysqli_fetch_assoc($results))
{}
This is the error
mysqli_result Object ( [current_field] => 0 [field_count] => 1 [lengths] => [num_rows] => 14 [type] => 0 ) object
Warning: mysqli_fetch_assoc() expects parameter 1 to be mysqli_result, boolean given in "path"