我正在尝试按月份名称订购 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
请告诉我我做错了什么