largest number of entries
| From: | Tyler Longren | Date: | Sun, 08 Oct 2000 22:40:14 +0000 |
| Subject: | largest number of entries | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-19114@lists.php.net to get a copy of this message | ||
Hey everybody,
Let's say that I have a mysql table, inside this table, there is a field
named 'name'. And let's say there are 10 different names in that field,
each in a different row. If the name 'Tyler' is in there 5 times, the
name 'Ronald' is in there 9 times, the name 'Vic' is in there 12 times,
the name 'Kristin' is in there 6 times, and the name 'Paul' is in there
8 times. That's 5 names, the other 5 names in there are only listed 1
time. How could I get the 5 highest entries? which would be:
Vic - 12
Ronald - 9
Paul - 8
Kristin - 6
Tyler - 5
???
That was pretty darn unclear, so if you don't understand what I mean,
just forget about it. :)
Thanks,
Tyler