MDL-36259 - change case of table alias to match definition

This commit is contained in:
Dan Poltawski 2012-12-18 14:26:55 +08:00
parent 3ab43c0502
commit 22898af76f

View File

@ -176,7 +176,7 @@ if (!empty($blocklist) and confirm_sesskey()) {
$blockname = $DB->get_field('block', 'name', array('id' => $blocklist));
$courses = array();
list($select, $join) = context_instance_preload_sql('c.id', CONTEXT_COURSE, 'ctx');
$sql = "SELECT C.* $select FROM {course} c
$sql = "SELECT c.* $select FROM {course} c
$join JOIN {block_instances} bi ON bi.parentcontextid = ctx.id
WHERE bi.blockname = ?";
$courses = $DB->get_records_sql($sql, array($blockname));