".theme('pager', 10);
}
else
{
$psearch="";
$tsearch="CHECKED";
$output.="Searching for people with a town like ".$locationsearch."
\n";
$result = pager_query("SELECT {profile_values}.uid, {profile_values}.value, {users}.name FROM {profile_values} LEFT JOIN {users} ON {users}.uid={profile_values}.uid WHERE ( ( {profile_values}.fid=9 ) and ( {profile_values}.value like '%%%s%%' ) and ( {users}.name IS NOT NULL ) ) ORDER BY {users}.name", 10,0,NULL,$locationsearch);
$output .= '
';
while ($account = db_fetch_object($result)) {
// $output .= theme('profile_profile', user_load(array('uid' => $account->uid)), $fields);
$output .= "| ".theme('user_picture', user_load(array('uid' => $account->uid)), $fields)." | ".theme('username', user_load(array('uid' => $account->uid)), $fields)." | ".$account->value." |
";
}
$output .= "
".theme('pager', 10);
}
}
if ($mysearchtype=='searchedregion') {
$output.="Searching for people in region : ".$regionsearch."
\n";
$result = pager_query("SELECT {profile_values}.uid, {users}.name, {regionspostcode}.postalarea, {regionspostcode}.regionname, {profile_values}.value FROM {profile_values} LEFT JOIN {users} ON {users}.uid={profile_values}.uid LEFT JOIN {regionspostcode} ON concat({regionspostcode}.postalarea,' -')=concat(trim(substring({profile_values}.value,1,2)),' -') WHERE ( ({profile_values}.fid=9 ) and ({regionspostcode}.regionname ='%s' ) and ({users}.name IS NOT NULL ) ) ORDER BY {users}.name", 10,0,NULL,$regionsearch);
$output .= '