Sorting by number is wrong

More
3 years 11 months ago #28 by kosin.ski
Hi, I wanted to sort my participants in the project by their number and I noticed that it's not working properly. If I have numbers like 3, 4, 7, 10, 25, they are sorted in this order: 10, 25, 3, 4, 7. It takes first character, sorts it by that, then moves to next character and sorts again. It looks like sorting alphabetically but with numbers. When I add prefix "0" in 3, 4, 7 it's working properly, but I don't think that's the proper solution. Would be great have it sorted in the next update. Cheers!

Please Log in to join the conversation.

More
3 years 11 months ago #30 by julienV
Replied by julienV on topic Sorting by number is wrong
i'll look it up, thanks. it's in backend, right?

Please Log in to join the conversation.

More
3 years 11 months ago #32 by kosin.ski
I think so. I am not an expert but I changed the column type in mysql table from varchar to int and it worked.

Please Log in to join the conversation.

More
3 years 11 months ago #33 by julienV
Replied by julienV on topic Sorting by number is wrong
right, i remember... I think that some people for some competitions use 'number' that are not just... numbers, that is why it is not forced to int. unfortunately there is no universal solution for this.

Please Log in to join the conversation.

Time to create page: 0.180 seconds
Powered by Kunena Forum