Hi,
I have a list of course numbers to sort: 1, 12, 13, 13L, 1L, 2,3,4,5,6,8 (see screenshot) https://imgur.com/a/SJTGCRf
The correct sort order is : 1, 1L, 12,13, 13L, 2,3,4,…
How can I do this? any ideas?
Thanks.
1 Answers
If using mysql, You can try setting for that column (e.g. course_number). This way it will remove all characters and only use numeric while sorting.
$col["sortname"] = "CAST(course_number AS UNSIGNED)";
Your Answer