Hello folks.
I have a postcode database:
Structure is:
postcode
x
y
The formula to calculate the (approximate) distance in miles, a straight line is apparently:
sqrt(pow(($a_x-$b_x), 2) + pow(($a_y-$b_y),2))*0.0006
;
What I'd like to do is when someone enters their postcode, eg: SW1 to be able to query the postcode and return the distances to the other postcodes with x miiles.
To summaries: I want to execute a query that returns all the postcodes within 10 miles of SW1
Start Free Trial