I have some statistics I need to report on a monthly basis. I need my query to return 0’s for statistics which aren’t there. The only way I know to do this is to use SQL to generate a list of days within the specified time period and LEFT JOIN the statistic data that I need to report on.
Problem is…. I’ve never not selected from a table like that… how do I do that?
I ended up just using SQL to pull the data I have for the given period and handling everything else on the PHP side. Not exactly what I wanted, but it works.