Welcome to the Question2Answer Q&A. There's also a demo if you just want to try it out.
+3 votes
186 views
in Q2A Core by
As per the related question I'm ordering the answers by votes, in descending order. But on one page there is an answer out of order. I thought it could be due to a discrepancy between up and down votes but I don't think that is the case.

Here is the ordering with up and down votes:

10 votes (+11, -1)
9 votes (+10, -1)
7 votes (+8, -1)
7 votes (+8, -1)
6 votes (+7, -1)
7 votes (+8, -1)
6 votes (+7, -1)
6 votes (+7, -1)
6 votes (+6, -0)
5 votes (+7, -2)
...

Any ideas why this might be happening? The code is just like in the related question:
$a_view['priority'] -= ( 10 * $a_view['netvotes_raw'] );
related to an answer for: Order the answers by votes?

1 Answer

+1 vote
by
selected by
 
Best answer
I expect this is because the multiple of 10 in this case was not enough to overcome the other factor (order of creation) that went into the ordering. Bump it up to 100 or so, and you should be all set. (BTW the final release of 1.2 will have an explicit option for ordering by votes.)
...