Hi,
My initial issue has been resolved... but I have come accross another.
Using this code:
$sql = 'SELECT COUNT(*), FROM_UNIXTIME(start_date, "%Y") AS year, FROM_UNIXTIME(start_date, "%c") AS month
FROM ibf_topics
WHERE (forum_id = "59" OR forum_id = "3" OR forum_id = "61") AND pinned = "0"
GROUP BY year, month ORDER BY year DESC, month DESC';
$result = $db->query($sql);
while ($row = $result->fetch_assoc()) {
// format dates
$year = $row['year'];
$month = $row['month'];
$strmonth = mktime(0,0,0,$month+1,0,0);
if (strlen($month) < 2) {
$month = '0'.$month;
}
echo '» <a href="index.php?page=month_archive&date='.$year.'-'.$month.'-00">';
echo date("M", $strmonth ).', '.$year.'</a></b><br />'."\n";
}
I get this list:
» Sep, 2006
» Aug, 2006
» Jul, 2006
» Jun, 2006
» May, 2006
» Apr, 2006
» Mar, 2006
But, there are records within the query paramaters that fall into the month of Oct, Nov, Dec... but for some reason these months aren't listed.
Does anyone have a clue why?
Thanks,
~Oni.