Jak uzyskać średnią w SQL w PHP
$result = mysql_query("SELECT AVG(fieldName) AS avg FROM tableName");
$row = mysql_fetch_assoc($result); echo $row['avg']
Amused Ant
$result = mysql_query("SELECT AVG(fieldName) AS avg FROM tableName");
$row = mysql_fetch_assoc($result); echo $row['avg']