Hi,
I have a database table called music.
It stores information about mp3's that users can post.
Users can also rate the mp3's.
Therefor i have a column called score and a column called score_number.
Score is the sum of all points an mp3 gets when someone rates it.
score_number is the amount of people that rated the mp3.
to know the rating of a song i divide score by score_number.
Now I want users to be able to select the songs by rating. So the top rated songs should appear first. How can I do this with an ORDER BY statement? I can't do this can i?:
"SELECT * FROM music ORDER BY score/score_number"
[mysql] "order by" question [solved]
Moderator: General Moderators
[mysql] "order by" question [solved]
Last edited by bytte on Sun Feb 15, 2004 9:04 am, edited 1 time in total.