Changeset 14499 for trunk/wp-includes/general-template.php
- Timestamp:
- 05/07/2010 05:01:29 AM (16 years ago)
- File:
-
- 1 edited
-
trunk/wp-includes/general-template.php (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-includes/general-template.php
r14486 r14499 966 966 } 967 967 } elseif ( 'weekly' == $type ) { 968 $ start_of_week = get_option('start_of_week');969 $query = "SELECT DISTINCT WEEK(post_date, $start_of_week) AS `week`, YEAR(post_date) AS yr, DATE_FORMAT(post_date, '%Y-%m-%d') AS yyyymmdd, count(ID) as posts FROM $wpdb->posts $join $where GROUP BY WEEK(post_date, $start_of_week), YEAR(post_date) ORDER BY post_dateDESC $limit";968 $week = _wp_mysql_week( '`post_date`' ); 969 $query = "SELECT DISTINCT $week AS `week`, YEAR( `post_date` ) AS `yr`, DATE_FORMAT( `post_date`, '%Y-%m-%d' ) AS `yyyymmdd`, count( `ID` ) AS `posts` FROM `$wpdb->posts` $join $where GROUP BY $week, YEAR( `post_date` ) ORDER BY `post_date` DESC $limit"; 970 970 $key = md5($query); 971 971 $cache = wp_cache_get( 'wp_get_archives' , 'general');
Note: See TracChangeset
for help on using the changeset viewer.