Re: arbitrary ORDER BY

2006-02-13 Thread Harald Fuchs
In article [EMAIL PROTECTED], Steve Lefevre [EMAIL PROTECTED] writes: For posterity, this is how I solved the problem: To create an abitrary for the ORDER BY clause, create a field like this: SELECT FIELD( field, arbitrary sort string 2, arbitrary sort string 3, arbitrary sort

Re: arbitrary ORDER BY

2006-02-12 Thread Peter Brawley
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

Re: arbitrary ORDER BY

2006-02-12 Thread Steve Lefevre
Peter Brawley wrote: Steve, Look for 'FIELD(' at http://dev.mysql.com/doc/refman/5.0/en/string-functions.html. 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: SELECT FIELD( field, arbitrary

arbitrary ORDER BY

2006-02-11 Thread Steve Lefevre
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