case when 出报表,
表的状态为0为作废,1为待付款,2为已付款
SELECT a.id AS 序号,CASE
WHEN a.status = 0 THEN '作废'
WHEN a.status = 1 THEN '待付款'
WHEN a.status = 2 THEN '已付款'
END AS 状态
FROM om_order a,pm_provider b,cum_cure_item c WHERE a.`provider_id` = b.id AND c.`appointment_time` BETWEEN '2015-03-01' AND '2015-03-31';
转载于:https://blog.51cto.com/9425473/1661274