我正在使用空间查询来查找给定纬度半径内的一些地方。并且很长。
select *, (3959 * ACOS(COS(radians(1.0)) * COS(radians(`lat`)) * COS(radians(`lng`) - radians(1.0)) + sin(radians(1.0)) * sin( radians(`lat`)))) AS distance
FROM table_name
HAVING distance <= 5
ORDER BY distance
这不返回任何值。查询有问题吗?
TIA。