Medoo #828 again

master
Skylar Ittner 5 years ago
parent e31c69c4bb
commit 501d9cad07

@ -16,7 +16,8 @@ if (!empty($VARS["radius"])) {
}
$searchbounds = $userlocation->boundingCoordinates($radius, "miles");
$people = $database->select("accounts", [
ob_flush();
$people = $database->debug()->select("accounts", [
"publicid",
"name",
"username",
@ -25,14 +26,17 @@ $people = $database->select("accounts", [
"longitude"
], [
"AND" => [
'latitude[><]' => [$searchbounds[0]->getLatitudeInDegrees(), $searchbounds[1]->getLatitudeInDegrees()],
'longitude[><]' => [$searchbounds[0]->getLongitudeInDegrees(), $searchbounds[1]->getLongitudeInDegrees()],
'latitude[<>]' => [$searchbounds[0]->getLatitudeInDegrees(), $searchbounds[1]->getLatitudeInDegrees()],
'longitude[<>]' => [$searchbounds[0]->getLongitudeInDegrees(), $searchbounds[1]->getLongitudeInDegrees()],
"lastgpsfix[>]" => date("Y-m-d H:i:s", strtotime("-1 hour")),
"type" => 2
],
"LIMIT" => 100
]
);
$query = ob_get_contents();
ob_clean();
$people = $database->query($query)->fetchAll();
$nearby = [];

Loading…
Cancel
Save