List:General Discussion« Previous MessageNext Message »
From:Steve Lefevre Date:February 13 2006 4:59am
Subject:Re: arbitrary ORDER BY
View as plain text  
Peter Brawley wrote:
> Steve,
> Look for 'FIELD(' at 
> PB

Thanks, Pete!

For posterity, this is how I solved the problem:

To create an abitrary for the ORDER BY clause, create a field like this:


FIELD( field,
  "arbitrary sort string 2",
  "arbitrary sort string 3",
  "arbitrary sort string 1"
) as sort_order

FROM table
ORDER BY sort_order

arbitrary ORDER BYSteve Lefevre12 Feb
  • Re: arbitrary ORDER BYPeter Brawley12 Feb
  • Re: arbitrary ORDER BYHarald Fuchs13 Feb
Re: arbitrary ORDER BYSteve Lefevre13 Feb