我想获取我周围的所有位置,但是该功能ST_Distance_Sphere不起作用。
我的查询:
select *, astext(location) as location from `locations`
where ST_Distance_Sphere(location, POINT(35.905069591297, 49.765869174153)) < 1000
Run Code Online (Sandbox Code Playgroud)
错误:
SQLSTATE[42000]: Syntax error or access violation:
1305 FUNCTION app.ST_Distance_Sphere does not exist (SQL:
select *, astext(location) as location from `locations`
where ST_Distance_Sphere(location, POINT(35.905069591297, 49.765869174153)) < 1000)
Run Code Online (Sandbox Code Playgroud)