Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR SQL

mysql where in maintain order

SELECT * FROM foo f where f.id IN (2, 3, 1)
ORDER BY FIELD(f.id, 2, 3, 1);
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #mysql #maintain #order
ADD COMMENT
Topic
Name
6+7 =