I'm trying to write a script to check a table to see which number is the "most popular" per se. I basically want to show the top 10 most popular X based on the number of that number in the row, if that's understandable. I'm having trouble visualizing how I would write this...
Thanks for reading this,
thanks in advance for any help on this..
mysql_num_rows question
Moderator: General Moderators
- aaronhall
- DevNet Resident
- Posts: 1040
- Joined: Tue Aug 13, 2002 5:10 pm
- Location: Back in Phoenix, missing the microbrews
- Contact:
Something like
Code: Select all
SELECT row, COUNT(row) as occurrences FROM table GROUP BY row