Use defined beginning of week.

git-svn-id: http://svn.automattic.com/wordpress/trunk@217 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
mikelittle 2003-06-12 22:45:27 +00:00
parent 6723d53c03
commit ce679e000f
1 changed files with 1 additions and 1 deletions

View File

@ -169,7 +169,7 @@ function get_archives($type='', $limit='') {
$start_of_week = 1; $start_of_week = 1;
} }
++$querycount; ++$querycount;
$arcresults = $wpdb->get_results("SELECT DISTINCT WEEK(post_date) AS `week`, YEAR(post_date) AS yr, DATE_FORMAT(post_date, '%Y-%m-%d') AS yyyymmdd FROM $tableposts WHERE post_date < '$now' AND post_category > 0 AND post_status = 'publish' ORDER BY post_date DESC" . $limit); $arcresults = $wpdb->get_results("SELECT DISTINCT WEEK(post_date, $start_of_week) AS `week`, YEAR(post_date) AS yr, DATE_FORMAT(post_date, '%Y-%m-%d') AS yyyymmdd FROM $tableposts WHERE post_date < '$now' AND post_category > 0 AND post_status = 'publish' ORDER BY post_date DESC" . $limit);
$arc_w_last = ''; $arc_w_last = '';
foreach ($arcresults as $arcresult) { foreach ($arcresults as $arcresult) {
if ($arcresult->week != $arc_w_last) { if ($arcresult->week != $arc_w_last) {