From: Peter Brawley Date: February 12 2006 6:58pm Subject: Re: arbitrary ORDER BY List-Archive: http://lists.mysql.com/mysql/194820 Message-Id: <43EF8567.1040109@earthlink.net> MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Steve, >I have a project where I need to sort rows by an arbitrary order. >I seem to recall at some point where I was able to do some SQL like: >ORDER BY > type = "the first type", > type = "another type", > type = "yes another arbitrary type" ... Check out the FIELD() function. PB ----- Steve Lefevre wrote: > Hey folks - > > I have a project where I need to sort rows by an arbitrary order. I > seem to recall at some point where I was able to do some SQL like: > > ORDER BY > type = "the first type", > type = "another type", > type = "yes another arbitrary type" ... > > However, my arbitrary ORDER BY statements don't seem to be working on > MySQL 5.0.16. > > Am I remembering correctly? I can't seem to find anything in the MySQL > manual. > > Steve > -- No virus found in this outgoing message. Checked by AVG Free Edition. Version: 7.1.375 / Virus Database: 267.15.6/257 - Release Date: 2/10/2006