Skip to content
Snippets Groups Projects
Commit 9727b3bd authored by Robert Anderson's avatar Robert Anderson
Browse files

Fixed SQL, some tables had been renamed

parent 74484b71
No related branches found
No related tags found
No related merge requests found
......@@ -21,17 +21,19 @@ function getAdminGroupMembers($params) {
# Filters and sorts are the same here
$filtersorts = array(
'ID' => 'users_to_groups.ID',
'Name' => 'group_attributes.Name',
'Username' => 'group_attributes.Username',
'Disabled' => 'group_attributes.Disabled'
);
$res = DBSelectSearch("
SELECT
ID, Name, Operator, Value, Disabled
users_to_groups.ID, users.Username, users.Disabled
FROM
group_attributes
users_to_groups, users
WHERE
GroupID = ".DBQuote($params[0])."
users.ID = users_to_groups.UserID
AND
users_to_groups.GroupID = ".DBQuote($params[0])."
",$params[1],$filtersorts,$filtersorts);
$sth = $res[0]; $numResults = $res[1];
......@@ -47,7 +49,7 @@ function getAdminGroupMembers($params) {
$item = array();
$item['ID'] = $row->id;
$item['Name'] = $row->name;
$item['Username'] = $row->username;
$item['Disabled'] = $row->disabled;
# push this row onto array
......
......@@ -43,7 +43,7 @@ function getAdminUserGroups($params) {
FROM
users_to_groups, groups
WHERE
groups.ID = users_to_groups.GroupID
users_to_groups.GroupID = groups.ID
AND users_to_groups.UserID = ".DBQuote($params[0])."
",$params[1],$filtersorts,$filtersorts);
......
......@@ -9,8 +9,8 @@ function getWiSPLocations($params) {
# Filters and sorts are the same here
$filtersorts = array(
'ID' => 'groups.ID',
'Name' => 'groups.Name'
'ID' => 'wisp_locations.ID',
'Name' => 'wisp_locations.Name'
);
$res = DBSelectSearch("SELECT ID, Name FROM wisp_locations",$params[1],$filtersorts,$filtersorts);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment