问题描述:有一个业务表,其状态值有以下几种
0:"待审批",1:"通过",2:"不通过",3:"驳回",4:"委托",
我的排序规则既不是 order by status desc 也不是 asc
而是按照 待审批 > 驳回 > 委托 > 通过 >不通过 的顺序排序
CREATE TABLE IF NOT EXISTS `test_process` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`status` int(11) DEFAULT 0,
`statusDesc` varchar(20) DEFAULT '',
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 AUTO_INCREMENT=1;
insert into test_process (status,statusDesc) value (0,'wait_approval');
insert into test_process (status,statusDesc) value (1,'pass');
insert into test_process (status,statusDesc) value (2,'not_pass');
insert into test_process (status,statusDesc) value (3,'callback');
insert into test_process (status,statusDesc) value (4,&#