MDL-34372: Fix query in backup_cron_helper so it works on Postgres 8.3

Amended by stronk7@moodle.org to use uppercase SQL keywords.
This commit is contained in:
Nathan Mares 2012-07-17 19:37:06 +10:00 committed by Eloy Lafuente (stronk7)
parent 821aac54b4
commit 4cb18cb080

View File

@ -255,7 +255,7 @@ abstract class backup_cron_automated_helper {
self::BACKUP_STATUS_SKIPPED => 0, self::BACKUP_STATUS_SKIPPED => 0,
); );
$statuses = $DB->get_records_sql('SELECT DISTINCT bc.laststatus, COUNT(bc.courseid) statuscount FROM {backup_courses} bc GROUP BY bc.laststatus'); $statuses = $DB->get_records_sql('SELECT DISTINCT bc.laststatus, COUNT(bc.courseid) AS statuscount FROM {backup_courses} bc GROUP BY bc.laststatus');
foreach ($statuses as $status) { foreach ($statuses as $status) {
if (empty($status->statuscount)) { if (empty($status->statuscount)) {