From 71a5dbd770a688b5439a494593a8f7790dc660fb Mon Sep 17 00:00:00 2001 From: skodak Date: Sat, 16 Aug 2008 19:12:25 +0000 Subject: [PATCH] MDL-15904 incorrect use of count sql fixed --- mod/assignment/db/upgrade.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mod/assignment/db/upgrade.php b/mod/assignment/db/upgrade.php index f10fe77c84..c79a6afd95 100644 --- a/mod/assignment/db/upgrade.php +++ b/mod/assignment/db/upgrade.php @@ -49,7 +49,7 @@ function xmldb_assignment_upgrade($oldversion) { JOIN {course_modules} cm ON (cm.module = m.id AND cm.instance = a.id) ORDER BY a.course, s.assignment"; - $count = $DB->count_records_sql("SELECT 'x' $sqlfrom"); + $count = $DB->count_records_sql("SELECT COUNT('x') $sqlfrom"); if ($rs = $DB->get_recordset_sql("SELECT s.id, s.userid, s.teacher, s.assignment, a.course, cm.id AS cmid $sqlfrom")) { -- 2.39.5