Ahoj, chcem urobiť priemer stĺpca temperature z tabuľky TempBedRoom. Problém je v tom, že temperature je typu float. Keď do sql query dám avg tak mi to hlási error Catchable fatal error: Object of class mysqli_result could not be converted to string
<?php $result = mysqli_query($con,"SELECT AVG(temperature) AS AverageTemperature FROM TempBedRoom") or die(mysqli_error($con));
echo $result;?>
Dík za pomoc.