Skip to content
Snippets Groups Projects
Unverified Commit f7109a74 authored by Pavel Břoušek's avatar Pavel Břoušek Committed by GitHub
Browse files

Merge pull request #44 from CESNET/more-robust-aggregation

change aggregation to deal with extra columns
parents c218cd63 195a9e86
Branches
Tags
No related merge requests found
......@@ -135,7 +135,8 @@ class DatabaseCommand
$msg = 'Aggregating daily statistics per ' . implode(' and ', array_filter($ids));
Logger::info($msg);
$query = 'INSERT INTO ' . $this->tables[self::TABLE_SUM] . ' '
. 'SELECT NULL, YEAR(`day`), MONTH(`day`), DAY(`day`), ';
. '(`year`,`month`,`day`,idpId,spId,logins,users) '
. 'SELECT YEAR(`day`), MONTH(`day`), DAY(`day`), ';
foreach ($ids as $id) {
$query .= ($id === null ? '0' : $id) . ',';
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment