]> git.mjollnir.org Git - moodle.git/commitdiff
MDL-15904 incorrect use of count sql fixed
authorskodak <skodak>
Sat, 16 Aug 2008 19:12:25 +0000 (19:12 +0000)
committerskodak <skodak>
Sat, 16 Aug 2008 19:12:25 +0000 (19:12 +0000)
mod/assignment/db/upgrade.php

index f10fe77c84c2f9b1136f2a76e8eb4abe8c4d3395..c79a6afd95fe1352e0e30f2d66c8d5ef1770c482 100644 (file)
@@ -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")) {