diff options
author | Christian Hofmaier | 2016-12-22 14:03:29 +0100 |
---|---|---|
committer | Christian Hofmaier | 2016-12-22 14:03:29 +0100 |
commit | 47a8eebcda2c841193420e6e7bb5ec847940f753 (patch) | |
tree | 11e820c9bd03181a33000c35a209545471673b7b /modules-available/statistics_reporting/inc | |
parent | [statistics_reporting] changed average to median (diff) | |
download | slx-admin-47a8eebcda2c841193420e6e7bb5ec847940f753.tar.gz slx-admin-47a8eebcda2c841193420e6e7bb5ec847940f753.tar.xz slx-admin-47a8eebcda2c841193420e6e7bb5ec847940f753.zip |
[statistics_reporting] better variable names
Diffstat (limited to 'modules-available/statistics_reporting/inc')
-rw-r--r-- | modules-available/statistics_reporting/inc/statisticreporting.inc.php | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/modules-available/statistics_reporting/inc/statisticreporting.inc.php b/modules-available/statistics_reporting/inc/statisticreporting.inc.php index d98ec168..2c4acaf1 100644 --- a/modules-available/statistics_reporting/inc/statisticreporting.inc.php +++ b/modules-available/statistics_reporting/inc/statisticreporting.inc.php @@ -87,13 +87,13 @@ class StatisticReporting public static function getOverallStatistics ($cutOffTimeInSeconds, $lowerTimeBound = 0, $upperTimeBound = 24) { $queryTime = time() - $cutOffTimeInSeconds; - $res = Database::simpleQuery("SELECT sum, median, countLong, countShort FROM - ( SELECT SUM(CAST(sessionTable.length AS UNSIGNED)) AS sum, GROUP_CONCAT(sessionTable.length) AS median, COUNT(*) AS countLong + $res = Database::simpleQuery("SELECT sum, median, longSessions, shortSessions FROM + ( SELECT SUM(CAST(sessionTable.length AS UNSIGNED)) AS sum, GROUP_CONCAT(sessionTable.length) AS median, COUNT(*) AS longSessions FROM ".self::getBoundedTableQueryString('~session-length', $lowerTimeBound, $upperTimeBound)." sessionTable WHERE sessionTable.dateline>=$queryTime AND sessionTable.data >= 60 ) t1 INNER JOIN - ( SELECT COUNT(sessionTable.length) as countShort + ( SELECT COUNT(sessionTable.length) as shortSessions FROM ".self::getBoundedTableQueryString('~session-length', $lowerTimeBound, $upperTimeBound)." sessionTable WHERE sessionTable.dateline>=$queryTime AND sessionTable.data < 60 ) t2"); |