Commit 2c7dd364 authored by Nigel McNie's avatar Nigel McNie
Browse files

Wrap table names in {} so the prefix gets added correctly.

parent be9650b2
......@@ -307,15 +307,15 @@ else {
COALESCE(a.staff, 0) AS staff,
COALESCE(a.admins, 0) AS admins
FROM
institution ii
{institution} ii
LEFT JOIN
(SELECT
i.name, i.displayname, i.maxuseraccounts,
COUNT(ui.usr) AS members, SUM(ui.staff) AS staff, SUM(ui.admin) AS admins
FROM
institution i
LEFT OUTER JOIN usr_institution ui ON (ui.institution = i.name)
LEFT OUTER JOIN usr u ON (u.id = ui.usr)
{institution} i
LEFT OUTER JOIN {usr_institution} ui ON (ui.institution = i.name)
LEFT OUTER JOIN {usr} u ON (u.id = ui.usr)
WHERE
(u.deleted = 0 OR u.id IS NULL)' . $where . '
GROUP BY
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment