SELECT xlng,xlat,xname,(st_distance(point (xlng, xlat), point(102.850584,24.954445))/ 0.0111) AS distance FROM t_orginfo HAVING distance<1 ORDER BY distance limit 100
# point(102.850584,24.954445) 为当前坐标
# distance<1 标识附近的范围 当前单位为 km
SELECT xlng,xlat,xname,(st_distance(point (xlng, xlat), point(102.850584,24.954445))/ 0.0111) AS distance FROM t_orginfo HAVING distance<1 ORDER BY distance limit 100
# point(102.850584,24.954445) 为当前坐标
# distance<1 标识附近的范围 当前单位为 km
本文标题:使用mysql查找附近的位置(人)
本文链接:https://www.haomeiwen.com/subject/eilecctx.html
网友评论