MDL-35270 fix ambiguously defined column

Credit goes to Sara Arjona, thanks.
This commit is contained in:
Petr Škoda
2012-09-08 10:49:49 +02:00
parent 71e12dc963
commit bafffec181
+2 -2
View File
@@ -51,8 +51,8 @@ class enrol_cohort_handler {
$sql = "SELECT e.*, r.id as roleexists
FROM {enrol} e
LEFT JOIN {role} r ON (r.id = e.roleid)
WHERE customint1 = :cohortid AND enrol = 'cohort'
ORDER BY id ASC";
WHERE e.customint1 = :cohortid AND e.enrol = 'cohort'
ORDER BY e.id ASC";
if (!$instances = $DB->get_records_sql($sql, array('cohortid'=>$ca->cohortid))) {
return true;
}