MySQL Forums
Forum List  »  Newbie

No Sort Order?
Posted by: Fraser Murrell
Date: May 24, 2005 02:48PM

Hi,

I have a SELECT statement such as:

SELECT category, title, pubdate FROM ds WHERE category = 3 OR category = 5 OR category = 4 OR category = 101 OR category = 7

I want the result set to return the results in the order that I have queried above (ie: 3,5,4,101,7) but MySQL seems to sort the category so I get the results as (3,4,5,7,101).

Other than splitting into 5 SELECT statements, is there any way I can use a query to say "DO NOT SORT"??

Thanks,
Fraser

Options: ReplyQuote


Subject
Written By
Posted
No Sort Order?
May 24, 2005 02:48PM
May 24, 2005 03:24PM
May 25, 2005 01:56AM
May 25, 2005 02:41AM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.