Newer
Older
<?php
include_once("include/db.php");
function removeWiSPLocationMember($params) {
$res = DBDo("UPDATE wisp_userdata SET LocationID = NULL WHERE UserID = ?",array($params[0]));
return $res;
}
return NULL;
}
function getWiSPLocationMembers($params) {
# Filters and sorts are the same here
$filtersorts = array(
'ID' => 'users.ID',
'Username' => 'users.Username'
);
$res = DBSelectSearch("
SELECT
users.ID, users.Username
FROM
wisp_userdata, users
WHERE
wisp_userdata.LocationID = ".DBQuote($params[0])."
AND
users.ID = wisp_userdata.UserID
",$params[1],$filtersorts,$filtersorts);
$sth = $res[0]; $numResults = $res[1];
# If STH is blank, return the error back to whoever requested the data
if (!isset($sth)) {
return $res;
}
$resultArray = array();
while ($row = $sth->fetchObject()) {
$item = array();
$item['ID'] = $row->id;
$item['Username'] = $row->username;
array_push($resultArray,$item);
}
return array($resultArray,$numResults);
}