Ragazzi.. =) Dovrei fare una classifica e ordinarla in modo crecrescente (dalla Media più bassa a quella più alta).
L'errore continua a darmelo nel "while(ecc.. ecc..)" ma non capisco il perchè.. =/ Potete aiutarmi ? =)
<?php
include("global.php");
$comando="select studente.CodStu, studente.Nome, studente.Cognome,studente.Scuola, AVG(Voto) as Media from studente inner join voto using (CodStu) group by studente.CodStu order by Media";
$risultato=mysql_query($comando);
echo "<table border='1' align='center'>";
while($riga=mysql_fetch_array($risultato))
{
echo "<tr>";
echo "<td>$riga[Nome]</td>";
echo "<td>$riga[Cognome]</td>";
echo "<td>$riga[Scuola]</td>";
echo "<td>$riga[Media]</td>";
echo "
";
echo "</tr>";
}
mysql_close($conn);
?>