php auto fill html table with blank data

laverndee

New Member
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?Current Code:\[code\] echo "<table border='1'> <tr> <th>Hour</th> <th>Questions</th> </tr><br><br>";while($row = mysql_fetch_assoc($questions)){echo "<tr>";echo "<td>" . $row['hr'] . "</td>";echo "<td>" . $row['COUNT(*)'] . "</td>";echo "</tr>";}echo "</table></td><td>";\[/code\]My query is:\[code\]$oct_week = mysql_query("SELECT COUNT(*), DATE(`dPostDateTime`) AS `day` FROM `tblQA` WHERE cCategory IN ('Football','Baseball','Basketball','Hockey') AND dPostDateTime >= '2010-10-01' AND dPostDateTime <= '2010-10-31' GROUP BY `day`");\[/code\]
 
Back
Top