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

Loading…
Cancel
Save