From 501d9cad07b1ef8f5a12c3868d1f4107ef837d9e Mon Sep 17 00:00:00 2001 From: Skylar Ittner Date: Mon, 1 Apr 2019 02:18:25 -0600 Subject: [PATCH] Medoo #828 again --- api/actions/nearby.php | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/api/actions/nearby.php b/api/actions/nearby.php index 0849c45..a4fa65a 100644 --- a/api/actions/nearby.php +++ b/api/actions/nearby.php @@ -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 = [];