mirror of
https://github.com/moodle/moodle.git
synced 2025-01-18 05:58:34 +01:00
ANSI join ON clauses should contain only the join condition. Also,
added prefix to the ORDER BY to prevent duplicate names.
This commit is contained in:
parent
aa87d82cec
commit
115a43113a
@ -908,9 +908,9 @@ function get_my_courses($userid, $sort='visible DESC,sortorder ASC', $fields=NUL
|
||||
ctx.id AS ctxid, ctx.path AS ctxpath,
|
||||
ctx.depth as ctxdepth, ctx.contextlevel AS ctxlevel
|
||||
FROM {$CFG->prefix}course_categories cc
|
||||
JOIN {$CFG->prefix}context ctx
|
||||
ON (cc.id=ctx.instanceid AND ctx.contextlevel=".CONTEXT_COURSECAT.")
|
||||
ORDER BY id";
|
||||
JOIN {$CFG->prefix}context ctx ON (cc.id = ctx.instanceid)
|
||||
WHERE ctx.contextlevel = ".CONTEXT_COURSECAT."
|
||||
ORDER BY cc.id";
|
||||
$rs = get_recordset_sql($sql);
|
||||
|
||||
// Using a temporary array instead of $cats here, to avoid a "true" result when isnull($cats) further down
|
||||
|
Loading…
x
Reference in New Issue
Block a user