Browse files

One GROUP BY -> DISTINCT

  • Loading branch information...
1 parent 0db8b2e commit 88487dea6db31247b3629d7bcce62db6efc61460 moodler committed Sep 10, 2003
Showing with 2 additions and 3 deletions.
  1. +2 −3 lib/datalib.php
View
5 lib/datalib.php
@@ -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 ");
}

0 comments on commit 88487de

Please sign in to comment.