MDL-40593 fixed SQL query to be postgres-compartible

This commit is contained in:
Marina Glancy
2013-07-09 22:24:02 +10:00
parent ed2896d990
commit deabf12e31
+1 -1
View File
@@ -1920,7 +1920,7 @@ class coursecat implements renderable, cacheable_object, IteratorAggregate {
} else if ($thislist === false) {
// We have $baselist cached but not $thislist. Simplier query is used to retrieve.
$ctxselect = context_helper::get_preload_record_columns_sql('ctx');
$sql = "SELECT ctx.instanceid id, $ctxselect
$sql = "SELECT ctx.instanceid AS id, $ctxselect
FROM {context} ctx WHERE ctx.contextlevel = :contextcoursecat";
$contexts = $DB->get_records_sql($sql, array('contextcoursecat' => CONTEXT_COURSECAT));
$thislist = array();