The following queries return the results in the same order 10, 11. How can I get it to return the results in the order I specify inside of IN() ?
SELECT * FROM `users` WHERE `id` IN (11, 10);
SELECT * FROM `users` WHERE `id` IN (10, 11);
Thanks!
The order of the IN values do not matter. What you can do is ORDER BY id.
SOLVED my own question :-P
SELECT * FROM `users` WHERE `id` IN (11, 10) ORDER BY FIELD(id, 11, 10);
Thanks laserlight 🙂