#1
|
||||
|
||||
about catalogue sorting
if you want catalogues to be sorted in natural order when you click the link to sort them
here's the sql (<catalog> if the keyword from the search) SELECT catalog, SUBSTRING_INDEX(catalog, '-', -1) AS cn FROM `<database>` WHERE catalog LIKE '<catalog>%' ORDER BY cn ASC like that instead of having KICA-1 KICA-1001 KICA-108 you will have KICA-1 KICA-108 KICA-1001 Last edited by Phonograph; Jul 11, 2012 at 06:10 PM. |
#2
|
||||
|
||||
That's a cool trick, though it would need to be more like this in the general case:
Quote:
|
#3
|
||||
|
||||
I don't get why you need two substring_indexes
because -1 means all numbers (theorically it should be numbers so that the numerical sorting works) after the - will be sorted naturally you count before the - I guess? Last edited by Phonograph; Jul 11, 2012 at 06:22 PM. |
#4
|
||||
|
||||
KICA-1
PICA-2 KICA-108 MICA-500 KICA-1001 vs KICA-1 KICA-108 KICA-1001 MICA-500 PICA-2 |
#5
|
||||
|
||||
ah I see, it's because I never search for something like "ica" but by stem (KICA, VTCL, SQEX, etc.)
|
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Entertainment EXPO2002 Catalogue CD | Secret Squirrel | Album Discussions | 3 | Aug 24, 2011 03:08 PM |
Sorting features for the wishlist | LiquidAcid | Questions and Comments | 2 | Sep 21, 2009 11:21 AM |
Sorting marketplace albums by Added Date | Kewing | Questions and Comments | 1 | Sep 21, 2009 12:28 AM |
Sorting out BlazBlue album differences | Ramza | Video Game Music Discussion | 0 | Jul 20, 2009 04:12 PM |
How to find out catalogue number from JAN? | Datschge | Video Game Music Discussion | 1 | Jul 2, 2008 08:10 PM |