php auto fill html table with blank data
<p>I have a HTML table that's being filled with data from a query (php). I have two months of data displayed, sept and oct. Since we've only had 15 days in Oct, it shows a table of 30 rows for Sept and only 15 rows for Oct. How can I have it display 31 rows for October, and fill in the blank rows as the days come?</p>

<p>Current Code:</p>

<pre><code> echo "&lt;table border='1'&gt;
 &lt;tr&gt;
 &lt;th&gt;Hour&lt;/th&gt;
 &lt;th&gt;Questions&lt;/th&gt;
 &lt;/tr&gt;&lt;br&gt;&lt;br&gt;";

while($row = mysql_fetch_assoc($questions))
{
echo "&lt;tr&gt;";
echo "&lt;td&gt;" . $row['hr'] . "&lt;/td&gt;";
echo "&lt;td&gt;" . $row['COUNT(*)'] . "&lt;/td&gt;";
echo "&lt;/tr&gt;";
}
echo "&lt;/table&gt;&lt;/td&gt;&lt;td&gt;";
</code></pre>

<p>My query is:</p>

<pre><code>$oct_week = mysql_query("SELECT COUNT(*), DATE(`dPostDateTime`) AS `day` FROM `tblQA` WHERE cCategory IN ('Football','Baseball','Basketball','Hockey') AND dPostDateTime &gt;= '2010-10-01' AND dPostDateTime &lt;= '2010-10-31' GROUP BY `day`");
</code></pre>
