This topic created in 4283 days ago, the information mentioned may be changed or developed.
如下:
select count(*) as num from a where id in (11,12,9,4,15) group by id;
这样输出数据后,不是按照 id的数据顺序 11,12,9,4,15 输出的
求解决方案 3Q!
3 replies 2014-08-05 11:54:25 +08:00  | | 1 yangqi Aug 5, 2014 3 ORDER BY FIELD(ID,11,12,9,4,15) |
 | | 2 hcy Aug 5, 2014 1 order by field(id ,11,12,9,4,15) 试下这个。 |