]> git.mjollnir.org Git - moodle.git/commitdiff
MSSQL and Oracle don't want DISTINCT clauses over TEXT/BINARY fields.
authorstronk7 <stronk7>
Mon, 4 Sep 2006 22:05:58 +0000 (22:05 +0000)
committerstronk7 <stronk7>
Mon, 4 Sep 2006 22:05:58 +0000 (22:05 +0000)
In this case, we simply delete it because SELECT g.* guarantees unique
records to be retrieved by the first field.

lib/datalib.php

index d2f081cd278b2a0fa76779b6fad397d7d48b37c6..8ab06350188eae0650320f45386a4f39ac468cc5 100644 (file)
@@ -687,7 +687,7 @@ function get_groups($courseid, $userid=0) {
         $userselect = '';
     }
 
-    return get_records_sql("SELECT DISTINCT g.*
+    return get_records_sql("SELECT g.*
                               FROM {$CFG->prefix}groups g $dbselect
                              WHERE g.courseid = '$courseid' $userselect ");
 }