Skip to content

Instantly share code, notes, and snippets.

@jackey
Created May 16, 2012 04:07
Show Gist options
  • Save jackey/2707285 to your computer and use it in GitHub Desktop.
Save jackey/2707285 to your computer and use it in GitHub Desktop.
Mysql draft
CREATE TABLE `table_name` (
`id` INT AUTO_INCREMENT,
`center` POINT,
`radius` INT
)
SELECT (GLength(LineStringFromWKB(LineString(pt,GeomFromText(center))))) AS rradius
FROM `table_name` t
WHERE t.radius > rradius
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment