Skip to content

Instantly share code, notes, and snippets.

@wmelton
Created December 22, 2017 19:23
Show Gist options
  • Save wmelton/10c15d79dd69090a88bc85e282afb3a7 to your computer and use it in GitHub Desktop.
Save wmelton/10c15d79dd69090a88bc85e282afb3a7 to your computer and use it in GitHub Desktop.
MySQL Point In Polygon
SELECT latitude, longitude
from mytable
where ST_CONTAINS(
GeomFromText( 'LINESTRING(50.5606 -1.8131,51.5606 -0.8131)' ),
point(longitude, latitude)
)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment