FRIHOSTFORUMSFAQTOSBLOGSDIRECTORY
You are invited to Log in or Register a Frihost Account!

SQL: SELECTing order ?

 


animassacre
For Ex. lets say we have this SQL Query:
Code:
SELECT * FROM table WHERE column in  (26,1,13,32,2)


it returs rows orderd by column -- 1,2,13,26,32
Arrow How can i query the table so the order of the rows will be 26,1,13,32,2 Question
animassacre
after a good sleep i answered the question myself:

SELECT * FROM table WHERE column1 IN (32,34,11) ORDER BY FIELD(column1,32,34,11 )
Reply to topic    Frihost Forum Index -> Scripting -> Php and MySQL

FRIHOST HOME | FAQ | TOS | ABOUT US | CONTACT US | SITE MAP
© 2005-2007 Frihost, forums powered by phpBB.