Skip to content

Commit

Permalink
One GROUP BY -> DISTINCT
Browse files Browse the repository at this point in the history
  • Loading branch information
moodler committed Sep 10, 2003
1 parent 0db8b2e commit 88487de
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions lib/datalib.php
Expand Up @@ -1090,13 +1090,12 @@ function get_users_longtimenosee($cutofftime) {
global $CFG;

$db->debug = true;
return get_records_sql("SELECT u.*
return get_records_sql("SELECT DISTINCT u.*
FROM {$CFG->prefix}user u,
{$CFG->prefix}user_students s
WHERE u.lastaccess > '0'
AND u.lastaccess < '$cutofftime'
AND u.id = s.userid
GROUP BY u.id");
AND u.id = s.userid ");
}


Expand Down

0 comments on commit 88487de

Please sign in to comment.