mirror of
https://github.com/moodle/moodle.git
synced 2025-08-06 01:16:44 +02:00
MDL-53451 competency: Fixing database errors on Oracle
- Random ordering caused by absence of ORDER BY clause - Invalid query statemennt due to wrong string concatenation - Cannot GROUP BY with CLOB columns
This commit is contained in:
parent
eb91deaa85
commit
0abaf33e00
5 changed files with 38 additions and 30 deletions
|
@ -107,6 +107,8 @@ class template_competency extends persistent {
|
|||
$params[] = 1;
|
||||
}
|
||||
|
||||
$sql .= ' ORDER BY tpl.id ASC';
|
||||
|
||||
$results = $DB->get_records_sql($sql, $params);
|
||||
|
||||
$instances = array();
|
||||
|
@ -199,11 +201,10 @@ class template_competency extends persistent {
|
|||
FROM {' . competency::TABLE . '} comp
|
||||
JOIN {' . self::TABLE . '} tplcomp
|
||||
ON tplcomp.competencyid = comp.id
|
||||
WHERE tplcomp.templateid = ?';
|
||||
WHERE tplcomp.templateid = ?
|
||||
ORDER BY tplcomp.sortorder ASC';
|
||||
$params = array($templateid);
|
||||
|
||||
$sql .= 'ORDER BY tplcomp.sortorder ASC';
|
||||
|
||||
$results = $DB->get_records_sql($sql, $params);
|
||||
|
||||
$instances = array();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue