The current query work perfect the problem is there is no data for the current month (April) so it does not list the month as 0, How do I get it to list the month as having 0 interivews?
QUERY
select distinct from_unixtime(interv_date,'%M %Y') AS month, count(*) as totals
from " . TABLE_PREFIX . "interviews
group by month
order by interv_date desc
limit 6
NOTE that the interv_date column is a epoch timestamp (example: 1428003691)
PHP
<table class=\"highchart\" data-graph-container=\"#graphcontainer\" data-graph-type=\"column\" data-graph-legend-disabled=\"1\">
<caption>Interviews by Month</caption>
<thead>
<tr>
<th>Month</th>
<th>Totals</th>
</tr>
</thead>
<tbody>
<?php
for ($i = 0; $i < $stat_logs["count"]; $i++) {
echo "<tr>
";
echo "<td>" . $stat_logs[$i]["month"] . "</td>
";
echo "<td>" . $stat_logs[$i]["totals"] . "</td>
";
echo "</tr>
";
}
?>
echo "</tbody>
echo "</table>
OUTPUT
Month Totals
March 2015 7
February 2015 5
January 2015 12
December 2014 18
November 2014 19
October 2014 5
I need it to output something like this:
Month Totals
April 2015 0
March 2015 7
February 2015 5
January 2015 12
December 2014 18
November 2014 19
Take not that not every month will have interviews so it won't just be the current month (first month) Any help on how I can get the months with no interviews to show up on the list would be great.