Thanks, I'll have to try that to see if it's faster. Adding another column as someone else suggested is too complex in comparison because it forces a bigger code change, and I don't really want that. Changing one SELECT-statement is enough...
/Henrik -----Original Message----- From: Jigal van Hemert [mailto:[EMAIL PROTECTED] Sent: den 24 mars 2004 16:12 To: [EMAIL PROTECTED] Subject: Re: How to optimize ugly order by? From: "Henrik Schröder" <[EMAIL PROTECTED]> > used a lot in various searches, and all results should be ordered by > membership type, but the order should not be 0-1-2, but instead 1-2-0. One thing you could do (not very neat IMHO) is to JOIN this query with a table that contains membershiptype and a sortorder. Then you can ORDER BY the sortorder of that table... Regards, Jigal. -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe: http://lists.mysql.com/[EMAIL PROTECTED] -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe: http://lists.mysql.com/[EMAIL PROTECTED]