11-13-2007, 09:58 AM
|
#3 (permalink)
|
|
Super Moderator
Join Date: Sep 2007
Posts: 165
Thanks: 0
|
Quote:
Originally Posted by CMellor
Hey, I'm pretty sure I know what AJAX rating bar your talking about, I used the base of it's code to make my own. This answer isn't 100% going to be what you want, but I like to attempt to help :) Try:
PHP Code:
ORDER BY ( totalvalue / totalvotes ) DESC // or ASC, whatever
|
That isnt a neat way of doing it, the following would be better:
PHP Code:
SELECT (totalvalue / totalvotes) as valbyvotes FROM table ORDER BY valbyvotes DESC
|
|
|
|