From: skodak Date: Tue, 9 Dec 2008 23:50:18 +0000 (+0000) Subject: MDL-15107 DML syntax fix X-Git-Url: http://git.mjollnir.org/gw?a=commitdiff_plain;h=5f501fe105819325502dc1ef4afb5a3b84f29788;p=moodle.git MDL-15107 DML syntax fix --- diff --git a/mod/feedback/analysis_course.php b/mod/feedback/analysis_course.php index ae02912cf0..53fc288440 100644 --- a/mod/feedback/analysis_course.php +++ b/mod/feedback/analysis_course.php @@ -101,7 +101,7 @@ echo '
'; if ($courseitemfilter > 0) { $avgvalue = 'avg(value)'; - if ($CFG->dbtype == 'postgres7') { + if ($DB->get_dbfamily() == 'postgres') { // TODO: this should be moved to standard sql DML function ;-) $avgvalue = 'avg(cast (value as integer))'; } if ($courses = $DB->get_records_sql ("SELECT fv.course_id, c.shortname, $avgvalue AS avgvalue