diff --git a/lib/db/upgrade.php b/lib/db/upgrade.php index 0534cc65857..2def886abfb 100644 --- a/lib/db/upgrade.php +++ b/lib/db/upgrade.php @@ -2441,7 +2441,7 @@ WHERE gradeitemid IS NOT NULL AND grademax IS NOT NULL"); // Find a category to put the courses in: $categories = $DB->get_records_sql('SELECT * ' . 'FROM {course_categories} ' . - 'WHERE name ilike \'misc%\' ' . + 'WHERE name like \'misc%\' ' . 'ORDER BY id asc'); if (!empty($categories)) { $category = array_shift($categories);