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

ios - Is 'init' forbidden as *part* of a variable name? -

javascript - Why Selenium can't find an element that is graphically visible -

qt - Microsoft FTP Service 451 The parameter is incorrect -