ciao,
provando a sommare i campi "esito" corrispondendi a campo "nick" uguale uso questa select:
$query_limit = mysql_query("SELECT SUM (esito) as totale FROM classifica WHERE tipo='N' GROUP BY nick ORDER BY id DESC LIMIT $primo, $per_page")or die(mysql_error());
while($results = mysql_fetch_array($query_limit)) {
echo "
<tr>
<td class=\"tw\"> " . $results['nick'] . "
</td>
<td class=\"tw\"> " . $results['squadra'] . "
</td>
<td class=\"tw\">" . $results['totale'] . "
</td>
</tr>";
}
ma mi da errore
credo dovuto all'uso incorretto di sum, visto che non lo ho mai usatoYou have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '(esito) as totale FROM classifica WHERE tipo='N' GROUP BY nick O...![]()
dove sbaglio?