我有一个名为hotspots
的表格。
id name date
1 foo 2011-06-15 15:10:34
2 bar 2011-07-02 16:45:18
还有一个表格 locations
hotspotid zipcode latitude longitude
1 90001 xxxxx xxxxx
2 45802 xxxxx xxxxx
如何使用SQL查询列出特定经纬度附近的热点,并限制在指定英里数内?
注:我希望有一个纯SQL的解决方案,但如果必要,也可以使用PHP。
谢谢