example table then ill ask question
comments table
id | userid | comment
1 | 2 | nice
2 | 1 | great
3 | 2 | hehe
4 | 3 | greetings
5 | 4 | phew
I have got a query where it counts all the comments added by the user's and tell me who has added the most comments.
Now i need a query that will output his last comment.
so user 2 has had the most comments so I need to output his last comment "hehe".
If i use this type of query i get all of his comments.
$result=mysql_query("SELECT userid, comments FROM comments where userid='2'");
while ($row = mysql_fetch_array($result3))
{
echo "$row[1],\n";
}
the result would be "nice,hehe"
but all i need is hehe
hope you can help
Lee
Thanks if you can