I've using POINT data type (mysql 5.7) , I want to search points given radious.
This is my table:
CREATE TABLE `points` (
`id` int(10) NOT NULL,
`name` varchar(45) ,
`location` point,
PRIMARY KEY (`id`),
)
I've used following sql.
SELECT id,X(location),Y(location),
ST_Distance_Sphere(point(30.714006, 76.853478),location)/1000 AS distance
FROM points HAVING distance < 100;
But the distance return by this statement is very less then actual
Thanks in advance!