Drekentai wrote:
I'm pretty sure it occasionally happens to a lot to see a ship in battle tab randomly that has no debuffs on what so ever that's far, far stronger. But I found a glitch in the process of going through battle tab, sorting puts the higher rank in reverse order.

Almost seems as if GL sorts by first 3 numbers, instead of just sorting by the whole number; that sounds like a ridiculous method.
What:Actually, this indicates that the ASP is treating the ranks as STRINGS instead of numbers for sorting. for an example use windows file system, it treats all file names as strings even if they are entirely composed of didgits.
How:When you compare strings you compare from the 1st didgit forward, and extra didgits are compared verses nulls.
Why:String compare uses the ascii (or now a-days unicode if supported) character values to determine if one should be above another.
Since special characters come first, followed by numbers followed by letters you get "wierd" sorting
Notes:I use this loophope to nail important folders or files to the top of a file list all the time at work, I will stick a bang/exclamation-point at the begining of something I always want to sort to the top.
When you use string compares this way you would have to pad the begingins with 0s to make the sort correct.
So in a file system I always use a larger number than I expect a set of filews or folders, or servers to reach.
I might name my servers: GL-Web01, GL-Web02, GL-Web03
I might name files GL_001.html, GL_002.html, GL_003.html
That is pretty much the only way to get strings to compare correctly as they would in a true numerical sort.
Solution(s):It IS possible for Dan to change this code to treat those values as true numbers, or he could also change the web-code to count characters and pad 0s at the begining; both of these options might be a bit slower to sort the list though.
Another option, which should be snappier, is he could change the view he grabs the sql data from to have two columns, one the normal rank as we see it, one a, say 8 character "rank" that has padded 0s and is a string representation of the rank of the user, it should be a pretty simple thing to implement, then just use that as a hidden column in the interface for him to do sorting on..