From 5f501fe105819325502dc1ef4afb5a3b84f29788 Mon Sep 17 00:00:00 2001 From: skodak Date: Tue, 9 Dec 2008 23:50:18 +0000 Subject: [PATCH] MDL-15107 DML syntax fix --- mod/feedback/analysis_course.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 -- 2.39.5