March 3rd, 2012, 10:06 AM
I have a silly question. Why are my photos being sorted by the first number rather than a consecutive set of numbers? Example, I've got all my file names beginning with a number and they are currently being sorted like this: 1, 10, 11, 12, 1453, 18, 2, 21, 32, 37, etc. I'd rather it sort like this: 1, 2, 10, 11, 12, 18, 21, 32, 37, 1453, etc.
Here's an example of what I'm talking about. Thanks!
March 3rd, 2012, 11:14 AM
Simply put this is how the mysql sort on that field works.
It goes through the title doing an alphanumeric sort.
March 3rd, 2012, 12:10 PM
Hmmm, bummer. Thanks for the reply though.
March 3rd, 2012, 01:20 PM
Yeah that is simply how mysql seems to do it. Basically any sort in our program is a sort done ASC or DESC on a specific field in the photos table. So title looks something like this
ORDER BY title ASC
This will sort titles by 0-9 and A-Z so basically how the mysql sort works 10 is before 2. The sort is always done on the first character and then if first character matches it moves to the second character so 1459 would also be before 148.
vBulletin® v3.8.1, Copyright ©2000-2014, Jelsoft Enterprises Ltd.