Mileage rank is also buggy in region.php.
http://travelmapping.net/user/region.php?u=yakra&rg=NY ranks me as # 42 in both the Active and the Active+Preview tables.
Down in the Travelers in Region NY table, I'm on the # 42 line for each. But looks can be deceiving: @dave1693 has 0.27 more active miles but is ranked below me.
On Lab2, This is differently sorted, and I'm on the # 43 line on the Active Systems table. But the rank still has me at # 42, not # 43.
Why?- The SQL query is ORDER BY activePercentage DESC, instead of, say, activeClinched.
- @dave1693 & I have the same activePercentage; we're incorrectly listed as tied. This is because activePercentage comes out of the SQL already rounded. We could not round it in the SQL query, instead having PHP round it when it's time to echo it to HTML.
Fixing either one of these bullet points should be sufficient to squash this bug.