From: skodak Date: Sat, 16 Aug 2008 19:12:25 +0000 (+0000) Subject: MDL-15904 incorrect use of count sql fixed X-Git-Url: http://git.mjollnir.org/gw?a=commitdiff_plain;h=71a5dbd770a688b5439a494593a8f7790dc660fb;p=moodle.git MDL-15904 incorrect use of count sql fixed --- 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")) {