From bafffec18191e5f20716f2845b1b221cdf2e6556 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Petr=20S=CC=8Ckoda?= Date: Sat, 8 Sep 2012 10:49:00 +0200 Subject: [PATCH] MDL-35270 fix ambiguously defined column Credit goes to Sara Arjona, thanks. --- enrol/cohort/locallib.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/enrol/cohort/locallib.php b/enrol/cohort/locallib.php index 5ca237a6c29..fb41a623ad7 100644 --- a/enrol/cohort/locallib.php +++ b/enrol/cohort/locallib.php @@ -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; }