I've created an archive index template and it's almost working as planned. The problem is only the last post is shown per month.
Here is the page:
http://www.designlegion.com/rave/archives/
Here is the php:
year
<?php
$myresults = $wpdb->get_results("SELECT DISTINCT YEAR(post_date) AS, MONTH(post_date) ASmonth, post_title , guid , post_content , comment_count FROM $wpdb->posts WHERE post_status = 'publish' GROUP BY YEAR(post_date), MONTH(post_date) ORDER BY post_date DESC");
if ( $myresults ) {
foreach ( $myresults as $myresult ) {
$url_date = get_month_link($myresult->year, $myresult->month);
$txt_date = sprintf('%s %d', $month[zeroise($myresult->month,2)], $myresult->year);
$url_arc = $myresult->guid;
$arc_name = $myresult->post_title;
$txt_arc = strip_tags($arc_name);
$content_arc = $myresult->post_content;
$num_comments = $myresult->comment_count;
echo"<h5><a href=$url_date>$txt_date</a></h5><ul><li><a href=$url_arc>$txt_arc</a> [$num_comments]</li></ul>";
}}?>
Anyone know what I'm missing to show all my posts under each month?