Need help with a natural sort order for version numbers and release code names

2007-10-12 Thread Daevid Vincent
I'm trying to get some 'release/version numbers' to sort properly. mysql SELECT ReleaseID, Name FROM releases ORDER BY Name DESC; +---+-+ | ReleaseID | Name| +---+-+ |18 | Unspecified | |20

Re: Need help with a natural sort order for version numbers and release code names

2007-10-12 Thread Jay Pipes
Daevid Vincent wrote: I'm trying to get some 'release/version numbers' to sort properly. mysql SELECT ReleaseID, Name FROM releases ORDER BY Name DESC; +---+-+ | ReleaseID | Name| +---+-+ |18 |

RE: Need help with a natural sort order for version numbers and release code names

2007-10-12 Thread Daevid Vincent
-Original Message- From: Jay Pipes [mailto:[EMAIL PROTECTED] Sent: Friday, October 12, 2007 2:07 PM To: Daevid Vincent Cc: mysql@lists.mysql.com Subject: Re: Need help with a natural sort order for version numbers and release code names Daevid Vincent wrote: I'm trying

Re: Need help with a natural sort order for version numbers and release code names

2007-10-12 Thread Adam Randall
Here's my full test solution: use test; drop table if exists releases; create temporary table releases ( releaseid int(10) unsigned not null auto_increment primary key, name varchar(255) )engine=myisam; insert into releases ( name ) values ( 'Unspecified' ), ( 'Next Patch' ), (

Re: Need help with a natural sort order for version numbers and release code names

2007-10-12 Thread Adam Randall
Oh, and here's the output (Sorry): +---+-+ | releaseid | name| +---+-+ | 1 | Unspecified | | 2 | Next Patch | | 3 | LOCset | | 4 | Abashiri| |