FIFO List order in a Set Using Mysql

by Mohan 2013-08-03 17:45:26


Hai,

Here is a mysql query example to select all details in order of the list. The details will be displayed in order of the find in set function.



SELECT * FROM table_name WHERE id IN (1, 3, 2,) ORDER BY FIND_IN_SET(id,'3,1,2');


This will display details in order of 3,1,2
607
like
0
dislike
0
mail
flag

You must LOGIN to add comments