feha
|
| Posted: 07/02/2002, 2:14 AM |
|
I would like in rating system to sort out the best rated sites ...
sum of rating/nr.votes ... how tot sort order this and display the site which has best rating compared vs number of votes...
The sum of ratings an nr of votes are on the same table but in two separate columns...
the mySQK query looks like:
---------------------------------------------------------------------
select comp_id , comp_rating, nr_votes from comp_register where comp_rating !=0 ORDER BY comp_rating desc
----------------------------------------------------------------------
What I would need is something like:
----------------------------------------------------------------------
select comp_id , comp_rating, nr_votes from comp_register where comp_rating !=0 ORDER BY round(comp_rating/nr_votes) desc ?????????
-----------------------------------------------------------------------
please for any help
thank You
feha
|
|
|
 |
feha
|
| Posted: 07/02/2002, 4:59 AM |
|
I found it out my self , the solution is:
-----------------------------------------------------------------------
select comp_id , comp_rating, nr_votes from comp_register where
comp_rating !=0 ORDER BY comp_rating desc ,nr_votes desc
-----------------------------------------------------------------------
|
|
|
 |
|