Skip to content

Commit

Permalink
only use same day sessions for session length
Browse files Browse the repository at this point in the history
  • Loading branch information
splitbrain committed Aug 17, 2016
1 parent e3b0c77 commit 2a62a0e
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion inc/StatisticsQuery.class.php
Expand Up @@ -85,7 +85,8 @@ public function aggregate($tlimit) {
$sql = "SELECT AVG(end - dt)/60 as time
FROM " . $this->hlp->prefix . "session as A
WHERE $tlimit
AND dt != end";
AND dt != end
AND DATE(dt) = DATE(end)";
$result = $this->hlp->runSQL($sql);
$data['timespent'] = $result[0]['time'];

Expand Down

0 comments on commit 2a62a0e

Please sign in to comment.