Skip to content

Commit

Permalink
mssql doesn't support aliases nor position numbers in the
Browse files Browse the repository at this point in the history
GROUP BY clause. Just columns and expressions.
  • Loading branch information
stronk7 committed Sep 1, 2006
1 parent 8351e29 commit 0be16c1
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/accesslib.php
Expand Up @@ -458,7 +458,7 @@ function load_user_capability($capability='', $context ='', $userid='') {
rc.contextid=$siteinstance->id
$capsearch
GROUP BY
rc.capability,aggrlevel,c1.id
rc.capability, (c1.aggregatelevel * 100), c1.id
HAVING
SUM(rc.permission) != 0
UNION
Expand All @@ -481,7 +481,7 @@ function load_user_capability($capability='', $context ='', $userid='') {
$capsearch
GROUP BY
rc.capability, aggrlevel, c1.id
rc.capability, (c1.aggregatelevel * 100 + c2.aggregatelevel), c1.id
HAVING
SUM(rc.permission) != 0
ORDER BY
Expand Down

0 comments on commit 0be16c1

Please sign in to comment.