SELECT * FROM `crm_class` WHERE class_idIN ( 1, 2, 3, 4 ) ORDER BY FIELD( class_id, 2, 3, 4, 1 ) LIMIT 0 , 30