![]() |
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! |
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:
|
Quote:
PHP Code:
|
Thanks guys, I didn't know you could use "/" in queries.
I should be able to get further now :) |
| All times are GMT. The time now is 02:38 PM. |
Powered by vBulletin® Version 3.6.8
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.1.0