I have a MySQL DB where I store dates in the following format
2017-04-03
I need to split or search dates to get all dates and records for January, Feb, March and so on in between all the dates I have in DB
$result = mysql_query("SELECT * FROM lbs_trace_etrack WHERE MONTH(lbs_date) = MONTH(CURDATE()) AND YEAR(lbs_date) = YEAR(CURDATE()) ORDER BY lbs_date DESC, lbs_time DESC");
I use the above query to search Current month and year. I am drawing up a graph that shows me stats from each month this is the reason I want each months count
I need to place the counts for the search in the following format.
var seriesData = [{
name: 'Hijackings',
data: [Value Jan, Value Feb, Value March, and all the other months ]
}, {
If anyone can just help me with the filter on each month query would help me greatly