Permalink
Browse files

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.
  • Loading branch information...
1 parent 821aac5 commit 4cb18cb080b9b5a3e08dee45b1c63ac28f98984c Nathan Mares committed with stronk7 Jul 17, 2012
Showing with 1 addition and 1 deletion.
  1. +1 −1 backup/util/helper/backup_cron_helper.class.php
@@ -255,7 +255,7 @@ public static function get_backup_status_array() {
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) {
if (empty($status->statuscount)) {

0 comments on commit 4cb18cb

Please sign in to comment.