Hi.. i have a table with a column for votes and for score.. obviously, when calculated, this gives us AVERAGE or what i call RATINGS
So when i want to sort by rating i do this:
SELECT * FROM aphrodisiacs ORDER BY rating/votes DESC LIMIT 0,10
this works fine on my home server.. but when uploaded to my public server... the results are different.
The fact that some rows I have has 0 votes and 0 scores (not rated so to speak)..
On my home server, it sorts the record sets ALMOST perfectly.. the one swith higher results from (score/votes) are on top...
The rows without votes and scores yet (not yet rated) are not shown though... (i actually want to show this at the bottom of the resulting record sets ofcourse.
now on my public server, the ones with zero votes and scores are shown first..
but if i do this:
SELECT * FROM aphrodisiacs WHERE [b]votes > 0[/b] ORDER BY rating/votes DESC LIMIT 0,10
both servers work properly.. except for the fact that it doesnt show the ones with no votes... which ofcourse i need shown..
got any ideas how to refine this?
tea