]> git.mjollnir.org Git - moodle.git/commitdiff
fixed broken SQL that was throwing errors in backup; merged from MOODLE_16_STABLE
authorskodak <skodak>
Tue, 23 May 2006 18:15:52 +0000 (18:15 +0000)
committerskodak <skodak>
Tue, 23 May 2006 18:15:52 +0000 (18:15 +0000)
mod/data/lib.php

index 841fd8399f1f17a5a005cb0fd7d2bbdbfb2e8179..8f3157ef94ef2864cca13d22f51045ab14f3e7ce 100755 (executable)
@@ -767,8 +767,8 @@ function data_get_participants($dataid) {
                                AND u.id = r.userid');
     
     $comments = get_records_sql('SELECT DISTINCT u.id, u.id from '.$CFG->prefix.
-                                'user u, '.$CFG->prefix.'data_comments c WHERE dataid="'.$dataid.'"
-                                AND u.id = c.userid');
+                                'user u, '.$CFG->prefix.'data_comments c, '.$CFG->prefix.'data_records r'.
+                                ' WHERE r.dataid="'.$dataid.'" AND u.id = c.userid AND r.id = c.recordid');
 
     $participants = array();