Permalink
Browse files

MDL-35270 fix ambiguously defined column

Credit goes to Sara Arjona, thanks.
  • Loading branch information...
1 parent 71e12dc commit bafffec18191e5f20716f2845b1b221cdf2e6556 @skodak skodak committed Sep 8, 2012
Showing with 2 additions and 2 deletions.
  1. +2 −2 enrol/cohort/locallib.php
@@ -51,8 +51,8 @@ public static function member_added($ca) {
$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;
}

0 comments on commit bafffec

Please sign in to comment.