Skip to content

Commit

Permalink
MSSQL and Oracle don't want DISTINCT clauses over TEXT/BINARY fields.
Browse files Browse the repository at this point in the history
In this case, we simply delete it because SELECT g.* guarantees unique
records to be retrieved by the first field.
  • Loading branch information
stronk7 committed Sep 4, 2006
1 parent 8f5c4ad commit 94ef00f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/datalib.php
Original file line number Diff line number Diff line change
Expand Up @@ -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 ");
}
Expand Down

0 comments on commit 94ef00f

Please sign in to comment.