Skip to content
This repository was archived by the owner on Sep 19, 2022. It is now read-only.

Commit f7109a7

Browse files
authored
Merge pull request #44 from CESNET/more-robust-aggregation
change aggregation to deal with extra columns
2 parents c218cd6 + 195a9e8 commit f7109a7

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

lib/DatabaseCommand.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -135,7 +135,8 @@ public function aggregate()
135135
$msg = 'Aggregating daily statistics per ' . implode(' and ', array_filter($ids));
136136
Logger::info($msg);
137137
$query = 'INSERT INTO ' . $this->tables[self::TABLE_SUM] . ' '
138-
. 'SELECT NULL, YEAR(`day`), MONTH(`day`), DAY(`day`), ';
138+
. '(`year`,`month`,`day`,idpId,spId,logins,users) '
139+
. 'SELECT YEAR(`day`), MONTH(`day`), DAY(`day`), ';
139140
foreach ($ids as $id) {
140141
$query .= ($id === null ? '0' : $id) . ',';
141142
}

0 commit comments

Comments
 (0)