I have the following sql code that works within sql however i am wanting to be able to perform the query via cfml template passing to it the radius and the long / lat of current location which needs to be converted into a geography type first
DECLARE @point geography = geography::Point([-27.5819482,153.3136523], 4326);
SELECT *, @point.STDistance(a.placeOfInterest) as distance FROM placesOfInterest_GeoFences a WHERE @point.STDistance(a.placeOfInterest) <= [100500]
Can anyone point me in the right direction so that my cfml template process the necessary code to then output the records that meet the query conditions. the values in [] are needing to be passed to the template dynamically each time variables
Look forward to any advise / assistance