Skip to content

Instantly share code, notes, and snippets.

@victusfate
Created October 9, 2018 20:01
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save victusfate/34fe6dad9a548a27fbca12d43b518751 to your computer and use it in GitHub Desktop.
Save victusfate/34fe6dad9a548a27fbca12d43b518751 to your computer and use it in GitHub Desktop.
mysql ellipsoidal query
select st_distance(
point(32.22174290, -110.92647900),
point(places.latitude, places.longitude)
) as distance, places.*
from places
order by distance asc
limit 50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment