Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

MDL-30514 registration: table aliases don't use AS keyword

This is a backport of both MDL-34072, MDL-34440 (initial fix
and following regression). Basically it's about to observe #12 of:
    http://docs.moodle.org/dev/Database
(Use the AS keyword always with column aliases but not with table aliases)
  • Loading branch information...
commit 7b18f18a1ecc92957cccb92f9bb08f193009cf9b 1 parent c5575c6
Eloy Lafuente (stronk7) stronk7 authored
Showing with 2 additions and 2 deletions.
  1. +2 −2 course/lib.php
4 course/lib.php
View
@@ -3945,7 +3945,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) total';
$params = array('siteid' => $SITE->id);
$enrolmenttotal = $DB->count_records_sql($sql, $params);
@@ -3978,7 +3978,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) total';
$params = array('siteid' => $SITE->id);
$moduletotal = $DB->count_records_sql($sql, $params);
Please sign in to comment.
Something went wrong with that request. Please try again.