Permalink
Browse files

MDL-34072: Adjust SQL for Oracle. Remove subquery alias altogether.

  • Loading branch information...
1 parent c6e9409 commit b9609850f699f5a45e5c94098c855fa8cb6a5376 @woolardfa woolardfa committed with Sam Hemelryk Jun 27, 2012
Showing with 2 additions and 2 deletions.
  1. +2 −2 course/lib.php
View
@@ -4032,7 +4032,7 @@ function average_number_of_participants() {
WHERE ue.enrolid = e.id
AND e.courseid <> :siteid
AND c.id = e.courseid
- AND c.visible = 1) as total';
+ AND c.visible = 1)';
$params = array('siteid' => $SITE->id);
$enrolmenttotal = $DB->count_records_sql($sql, $params);
@@ -4065,7 +4065,7 @@ function average_number_of_courses_modules() {
WHERE c.id = cm.course
AND c.id <> :siteid
AND cm.visible = 1
- AND c.visible = 1) as total';
+ AND c.visible = 1)';
$params = array('siteid' => $SITE->id);
$moduletotal = $DB->count_records_sql($sql, $params);

0 comments on commit b960985

Please sign in to comment.