Suppose I have a 2 column table like this:
| user_id | int(11) | NO | UNI | NULL | |
| utm | point | NO | MUL | NULL
Solved. This is what I did:
where GLength(LineStringFromWKB(LineString(asbinary(utm), asbinary(@mypoint)))) < 9999999999999;
As far as I know, u have to try this way-
select * from mytable
where
(
GLength(
LineStringFromWKB(
LineString(
geoPoint,
GeomFromText('POINT(51.5177 -0.0968)')
)
)
)
) < 99999999
More in this answer.
You can also do it this way. Not sure if it's faster or not.
select * from mytable where glength(geomfromtext(concat('linestring(', x(utm), ' ', y(utm), ',20 20', ')'))) < 99999999