Don't show 0 as a month.

git-svn-id: http://svn.automattic.com/wordpress/trunk@3202 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
matt
2005-11-23 07:57:58 +00:00
parent e8f47bf315
commit 45c73a3298
3 changed files with 5 additions and 4 deletions

View File

@@ -81,7 +81,8 @@ if ( is_month() ) {
</fieldset>
</form>
<?php $arc_result = $wpdb->get_results("SELECT DISTINCT YEAR(post_date) AS yyear, MONTH(post_date) AS mmonth FROM $wpdb->posts ORDER BY post_date DESC");
<?php $arc_result = $wpdb->get_results("SELECT DISTINCT YEAR(post_date) AS yyear, MONTH(post_date) AS mmonth FROM $wpdb->posts WHERE post_date != '0000-00-00 00:00:00' ORDER BY post_date DESC");
if ( count($arc_result) ) { ?>
<form name="viewarc" action="" method="get" style="float: left; width: 20em; margin-bottom: 1em;">