Index: trunk/extensions/MetricsReporting/ApiAnalyticsBase.php |
— | — | @@ -49,6 +49,7 @@ |
50 | 50 | if ( $params['startmonth'] && !$params['endmonth'] ) { |
51 | 51 | $query['conds']['date'] = $params['startmonth']; |
52 | 52 | } else { |
| 53 | + // Note: date must be YYYY-MM-DD, using YYYY-MM may make nasty queries |
53 | 54 | //add 1 month to end of date because of the way data is stored |
54 | 55 | $endMonth = date( "Y-m-d", strtotime( $params['endmonth'] . " +1 month" ) ); |
55 | 56 | |
Index: trunk/extensions/MetricsReporting/metrics/ComScoreReachPercentageMetric.php |
— | — | @@ -11,7 +11,7 @@ |
12 | 12 | |
13 | 13 | protected function getQueryInfo() { |
14 | 14 | return array( |
15 | | - 'table' => array( 'comscore', 'comscore_regions'), |
| 15 | + 'table' => array( 'comscore', 'comscore_regions' ), |
16 | 16 | 'conds' => array(), |
17 | 17 | 'options' => array( 'GROUP BY' => 'comscore.region_code, date', 'ORDER BY' => 'comscore.region_code, date' ), |
18 | 18 | 'join_conds' => array( 'comscore_regions' => array( 'LEFT JOIN', "comscore.region_code = comscore_regions.region_code" ) |
— | — | @@ -20,7 +20,7 @@ |
21 | 21 | } |
22 | 22 | |
23 | 23 | protected function getQueryFields() { |
24 | | - return array( 'date', 'reach', 'comscore.region_code', 'region_name'); |
| 24 | + return array( 'date', 'reach', 'comscore.region_code', 'region_name' ); |
25 | 25 | } |
26 | 26 | |
27 | 27 | protected function takesReportLanguage(){ |