FRIHOSTFORUMSSEARCHFAQTOSBLOGSDIRECTORY
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 )
Related topics

have problem on my sql
SQL Basics
Sql Error: 1017. Missing all the indexes files of phpbb
SQL error notification in my forum
Need Expert help in php-mysql

inverting order
Error trying to display SQL statement in html table
how to create a new user in sql
ORDER BY (SOLVED! Please close!)
Strange SQL cursor problem. Pls do not ignore if can help.

Help: SQL error after uploading new files(thread updated)
script backup database
survey Insert in Php
SLOW UPLOADING AN SQL FILE
What computer languages you know?
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.