I wanted to ask can any one help me to join this two statement into one
SELECT * FROM worker_leave WHERE YEAR(yearAppplied) = YEAR(DATE_SUB(CURDATE(), INTERVAL 1 YEAR))
And
SELECT * FROM worker_leave WHERE YEAR(yearAppplied) = YEAR(CURDATE())
I want to achieve counting the total leave a person have within current year and previous year total must not be more than 24 (Can be control at php side)