[wp-trac] [WordPress Trac] #10397: Start of week and WEEK mysql date function

WordPress Trac wp-trac at lists.automattic.com
Mon Jul 13 09:19:08 UTC 2009


#10397: Start of week and WEEK mysql date function
--------------------------+-------------------------------------------------
 Reporter:  arena         |       Owner:            
     Type:  defect (bug)  |      Status:  new       
 Priority:  normal        |   Milestone:  Unassigned
Component:  General       |     Version:            
 Severity:  normal        |    Keywords:            
--------------------------+-------------------------------------------------
 In wp-includes/general-template.php :

 {{{
 $start_of_week = get_option('start_of_week');
 $query = "SELECT DISTINCT WEEK(post_date, $start_of_week) AS `week`,
 ........
 }}}


 last argument value can lead to malfunction

 see http://dev.mysql.com/doc/refman/5.1/en/date-and-time-
 functions.html#function_week

-- 
Ticket URL: <http://core.trac.wordpress.org/ticket/10397>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software


More information about the wp-trac mailing list