MySQL Forums
Forum List  »  InnoDB

Re: Need help with query with "where in" statment
Posted by: Roland Bouman
Date: January 17, 2006 04:46PM

SELECT *
FROM users
where users.id in (141,139,140)
order by FIELD(users.id, 141,139,140)

see: http://dev.mysql.com/doc/refman/5.0/en/string-functions.html

[BTW: this has nothing to do with transactions - more appropriate in the general or the newbie list]

Options: ReplyQuote


Subject
Views
Written By
Posted
Re: Need help with query with "where in" statment
1565
January 17, 2006 04:46PM


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.