view posts by this user Offline
    Reply with quote Post a reply
I'm a developer myself and noticed a classic issue. The scores are sorted as text and not by numbers. Therefore, 200 is > 1000. To get things to sort correctly, you should cast the number before sorting.

MySQL Cast Example:
ORDER BY
CAST(score AS INT)

However, a better alternative is to store the number as an integer. Then, a cast is not required, storage space is reduced, and performance increases.
Site Admin
view posts by this user Offline
Site Admin
    Reply with quote Post a reply
Ah, the problem is not in MySQL, it sorts ok (as int) when you use cache report. When you use live report, javascript should do the sorting after all characters have been loaded (or when you press abort button), but it could be that it's not sorting well, I'll take a look. Thanks for pointing this out :)
Jump to :