Permalink
Browse files

Fix CountDAO query grouping when a new year starts midweek

  • Loading branch information...
1 parent 61f8502 commit e59f4615902667e901d472c3c4b8373753812638 @ginatrapani ginatrapani committed Jan 4, 2014
Showing with 1 addition and 1 deletion.
  1. +1 −1 webapp/_lib/dao/class.CountHistoryMySQLDAO.php
@@ -62,7 +62,7 @@ public function getHistory($network_user_id, $network, $units, $limit=10, $befor
$group_by = 'fc.date';
$date_format = "DATE_FORMAT(date, '%m/%d/%Y')";
} else if ($units == 'WEEK') {
- $group_by = 'YEAR(fc.date), WEEK(fc.date)';
+ $group_by = 'YEARWEEK(fc.date)';
$date_format = "DATE_FORMAT(date, '%m/%e')";
} else if ($units == 'MONTH') {
$group_by = 'YEAR(fc.date), MONTH(fc.date)';

0 comments on commit e59f461

Please sign in to comment.