Jaxel
Well-known member
When I need to locate something by GPS latitude and longitude... I need to put the following in my select clause:
How would I accomplish this with the finder system?
PHP:
SELECT event.* AS event,
(6371 * acos(
cos( radians( $latitude ) )
* cos( radians( event.event_latitude ) )
* cos( radians( event.event_longitude ) - radians( $longitude ) )
+ sin( radians( $latitude ) )
* sin( radians( event.event_latitude ) )
)) AS distance
...
...
...
HAVING distance < $distance