mysql 要按in(1,3,13,2,33,79,66)顺序显示方法

select * from tb_user where fid IN (10,33,22,76,13,44) order by FIND_IN_SET(fid,'10,33,22,76,13,44');

select * from tb_user where fid IN (10,33,22,76,13,44) order by field(fid,10,33,22,76,13,44);

posted @ 2013-03-27 23:15  /折磨  阅读(194)  评论(0编辑  收藏  举报