fix for MDL-7112 select distinct on text fields

This commit is contained in:
toyomoyo
2006-11-02 02:16:52 +00:00
parent ba39176b59
commit bcbb41a0fa
2 changed files with 3 additions and 3 deletions
+2 -2
View File
@@ -30,7 +30,7 @@
// Get only the attempts that are in response to essay questions
if ($essayattempts = get_records_select('lesson_attempts', 'pageid IN('.implode(',', array_keys($pages)).')')) {
// Get all the users who have taken this lesson, order by their last name
if (!$users = get_records_sql("SELECT DISTINCT u.*
if (!$users = get_records_sql("SELECT u.*
FROM {$CFG->prefix}user u,
{$CFG->prefix}lesson_attempts a
WHERE a.lessonid = '$lesson->id' and
@@ -130,7 +130,7 @@
}
} else {
$queryadd = '';
if (!$users = get_records_sql("SELECT DISTINCT u.*
if (!$users = get_records_sql("SELECT u.*
FROM {$CFG->prefix}user u,
{$CFG->prefix}lesson_attempts a
WHERE a.lessonid = '$lesson->id' and
+1 -1
View File
@@ -17,7 +17,7 @@
list($cm, $course, $lesson) = lesson_get_basics($id);
if (! $students = get_records_sql("SELECT DISTINCT u.*
if (! $students = get_records_sql("SELECT u.*
FROM {$CFG->prefix}user u,
{$CFG->prefix}lesson_attempts a
WHERE a.lessonid = '$lesson->id' and