The sys_userid is the user that created the record, it is not necessarrily the owner of the record. If you wnat to get the owner, then use the sys_groupid.
Your querys can not work as you used the sys_groupid and sys_userid of the client record. The client record is always owned by the administartor of the server.
Example:
Code:
$groupid = client_get_groupid($session_id, $client_id);
$sites = sites_web_domain_get($session_id, array("sys_groupid" => $groupid) );