]> git.mjollnir.org Git - moodle.git/commitdiff
One GROUP BY -> DISTINCT
authormoodler <moodler>
Wed, 10 Sep 2003 13:28:27 +0000 (13:28 +0000)
committermoodler <moodler>
Wed, 10 Sep 2003 13:28:27 +0000 (13:28 +0000)
lib/datalib.php

index aea2739f673cd2b02a32abe6348689acf09f2e85..4e53ec86728fb26cca79e4a2d8fe0e1756eef90e 100644 (file)
@@ -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 ");
 }