I need to select records from a table based on a pythagorean query.
$MorcE is a fixed Easting and MorcN is a fixed Northing.
The table contains the Easting and Northing for each comparison town.
This query gives me a -2 row count (duff query) but I think it is a simple syntax problem.
NB INT has to be forced to prevent negative vars.
Also, how do I order the resulting towns in distance order?
Keith
$MorcE is a fixed Easting and MorcN is a fixed Northing.
The table contains the Easting and Northing for each comparison town.
This query gives me a -2 row count (duff query) but I think it is a simple syntax problem.
Code:
SELECT REGION, COUNTY, CITY, DISTRICT FROM JADTOWN WHERE SQRT((POWER(INT($MorcE-'EAST'),2)) + (POWER(INT($MorcN-'NORT'),2))) < 50"
Also, how do I order the resulting towns in distance order?
Keith