Return all mySQL Records for Current Year
mysql
Solution
SELECT COUNT(*)
FROM TABLE1
WHERE YEAR(START_DATE) = YEAR(CURDATE());
Problem
In mySQL, I would like to return a count of the records that have a `start_date` within the current year (as in the year 2012, NOT within the last one year time period) and (as a separate query) a count of the records from the previous year (2011 in the case as it is now). My start dates are stored thus: `2012-12-02`. I am using PHP. Help on how I would form these queries would be hugely appreciated.