Mysql, order by "pattern"? -


i want order type, pattern. records now:

type name

1    2    b 1    c 4    d 4    e 3    f 2    g 3    h 

my pattern 2,4,3,1 get:

2    b 2    g 4    d 4    e 3    f 3    h 1    1    c 

use order field (type,2,4,3,1). give correct result.


Comments

Popular posts from this blog

sequelize.js - Sequelize group by with association includes id -

android - Robolectric "INTERNET permission is required" -

java - Android raising EPERM (Operation not permitted) when attempting to send UDP packet after network connection -