Not sure there's a good way to do that ... here's one possible solution:

create a little extra table like so:

create table mytemptable
(mytemptable_id int not null auto_increment primary key,
table_id int,
key table_id_idx (table_id));

then insert your values for your IN clause into 'mytemptable' in the
proper order,
then issue a query that joins on that table and orders by the ID
number of the temp table:

select t.*
from table t, mytemptable mtt
where t.id = mtt.table_id
order by mtt.mytemptable_id

And finally delete your entries from your extra table so the next
query is accurate.

Not pretty eh?

Dan


On 7/19/06, OKAN ARI <[EMAIL PROTECTED]> wrote:
I have a sql query like SELECT * FROM table WHERE id IN (4,88,23);
Result order in ID is: 4,23,88

But I need to receive result in order 4,88,23. So how can I manage to receive 
result in order LIKE IN() clause?

regards, okan


--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:    http://lists.mysql.com/[EMAIL PROTECTED]

Reply via email to