Eigenlijk is dit beter:
SELECT * FROM your_table
WHERE id IN (5,2,6,8,12,1)
ORDER BY FIELD(id,5,2,6,8,12,1);
hier is de VELD-documentatie:
http://dev.mysql.com/doc /refman/5.0/en/string-functions.html#function_field
Eigenlijk is dit beter:
SELECT * FROM your_table
WHERE id IN (5,2,6,8,12,1)
ORDER BY FIELD(id,5,2,6,8,12,1);
hier is de VELD-documentatie:
http://dev.mysql.com/doc /refman/5.0/en/string-functions.html#function_field