Skip to content

Instantly share code, notes, and snippets.

@m3talsmith
Created September 10, 2010 00:55
Show Gist options
  • Save m3talsmith/572861 to your computer and use it in GitHub Desktop.
Save m3talsmith/572861 to your computer and use it in GitHub Desktop.
SELECT `properties`.* FROM `properties` WHERE (
(ACOS(least(1,COS(0.581302161922681)*COS(-1.95199805553677)*COS(RADIANS(properties.lat))*COS(RADIANS(properties.lng))+
COS(0.581302161922681)*SIN(-1.95199805553677)*COS(RADIANS(properties.lat))*SIN(RADIANS(properties.lng))+
SIN(0.581302161922681)*SIN(RADIANS(properties.lat))))*3963.19)
) LIMIT 0, 10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment