MySQL query data within a specified range of data types by POIN

SELECT
*,
AsText(location) as 原始坐标数据,
(st_distance(location, point(116.397915,39.908946))*111) AS distance
FROM
oc_district
HAVING
distance<100
ORDER BY
distance limit 100;

Guess you like

Origin www.cnblogs.com/Soy-technology/p/10981124.html