I've decided to detect distance between two points. One of the points is static -35.735019 51.410041
, however, the other one is a point which is given by a database field.
Here is my code:
SELECT
r0_.restaurant_point AS restaurant_point_0,
ST_Distance(GeomFromText('POINT(35.735019 51.410041)'), GeomFromText('POINT(r0_.restaurant_point)')) *
100 AS sclr_1
FROM restaurants r0_
We stored r0.restaurant_point
as a VARCHAR
. Take the string below as an example: 35.73062161548168 51.410930156707764
Although it would be worked if I change r0.restaurant_point
with static value, it can't get measure with database field.
Is there anyway for binding this value or another way to resolve?