执行以下代码时。。。
SELECT city,
6371 * 2 * ASIN(SQRT(POWER(SIN(RADIANS(40.85093330 - ABS(sample_locations.latitude))), 2) + COS(RADIANS(40.85093330)) * COS(RADIANS(ABS(sample_locations.latitude))) * POWER(SIN(RADIANS(-73.97013820 - sample_locations.longitude)), 2))) AS distance
FROM sample_locations
WHERE sample_locations.latitude BETWEEN (40.85093330 – 10 / (111.04)) AND (40.85093330 + 10 / (111.04)) AND sample_locations.longitude BETWEEN (-73.97013820 – 10 / ABS(COS(RADIANS(40.85093330)) * 111.04)) AND (-73.97013820 + 10 / ABS(COS(RADIANS(40.85093330)) * 111.04))
HAVING distance < 10
ORDER BY distance LIMIT 10;
我得到错误。。。
暂无答案!
目前还没有任何答案,快来回答吧!