INSERT IGNORE INTO users (userid,username) VALUES (2,'swan'),(4,'bear') ;
INSERT IGNORE INTO users (userid,username) VALUES (2,'swan'),(4,'bear') ;
--- Query OK, 1 row affected, 1 warning (0.02 sec) Records: 2 Duplicates: 1 Warnings: 1
select *
from icons where id in(4, 5, 6) order by field(id, 5, 4, 6) => mysql> select * from icons where id in(4, 5, 6) order by field(id, 5, 4, 6);