View Single Post
Old 11-10-2007, 01:13 PM   #1 (permalink)
Sled
The Contributor
 
Join Date: Oct 2007
Posts: 35
Thanks: 2
Sled is on a distinguished road
Default Order by top rated?

Hey,
I've installed this ajax rating script on my site, and I'd like to have a list with 5 items, ordered by top rated.
Thins are stored like this in database: there's a column with the total votes, and a column with total value. (this is to make sure every vote has same importance)
Now to order them I'd need to do something like order by totalvalue/totalvotes.
But I have no idea how to do that ...
Any suggestions please?

Thanks!
Sled is offline  
Reply With Quote