this is the woole code....
I tried with this code:
ho modificato il codice in:
$sql = "SELECT UserID,Name,AuthUserID,CommentID,count(*) AS numero_commenti
FROM consigli_User AS u JOIN consigli_Comment AS c JOIN consigli_ThankfulPeople AS v
ON u.UserID=c.AuthUserID
AND c.AuthUserID=v.UserID
AND c.CommentID=v.CommentID
GROUP BY numero_commenti
ORDER BY numero_commenti DESC";
$res=mysql_query($sql) or die ("Query non valida: $sql <br>Errore: ".mysql_error());
while ($row = mysql_fetch_row($res)) {
echo 'ID: ', $row[0] , ' Nome: ', $row[1] , "\n";
}
and i have this error:
Query non valida: SELECT UserID,Name,AuthUserID,CommentID,count(*) AS numero_commenti FROM consigli_User AS u JOIN consigli_Comment AS c JOIN consigli_ThankfulPeople AS v ON u.UserID=c.AuthUserID AND c.AuthUserID=v.UserID AND c.CommentID=v.CommentID GROUP BY numero_commenti ORDER BY numero_commenti DESC
Errore: Column 'UserID' in field list is ambiguous
help?????