我想按照月份名称对MySQL查询进行排序,例如:
January -- 5
February -- 2
March -- 5
and so on
这是我的查询,但它没有排序:
SELECT leave_balance.balance, MonthName(leave_balance.date_added) AS month
FROM leave_balance WHERE leave_balance.staff_id_staff = $iid
GROUP BY month, leave_balance.leave_type_id_leave_type
HAVING leave_balance.leave_type_id_leave_type = $leaveBalTypID
ORDER BY month
请告诉我我做错了什么。