VGMdb
Go Back   VGMdb Forums > VGMdb Site Related > Questions and Comments
Register FAQ Calendar Today's Posts Mark Forums Read Search

 
 
Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1  
Old Jul 11, 2012, 05:54 PM
Phonograph's Avatar
Phonograph Phonograph is online now
Senior Member
 
Join Date: Jun 2010
Posts: 4,351
Default 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.
Reply With Quote
 


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

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