Cómo obtener el promedio en SQL en 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']