Jump to content

ROUND(AVG(scores))


Bickey

Recommended Posts

Of course it didn't; the query is never executed.

 

$query = "SELECT ROUND(AVG(scores)) AS avg FROM table";
$result = mysql_query($query);
$array = mysql_fetch_assoc($result);

echo "<br>The average score is {$array['avg']}<br>";

Link to comment
https://forums.phpfreaks.com/topic/222399-roundavgscores/#findComment-1150633
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.