Jump to content

Recommended Posts

Posted

I have two database tables:

 

The first which is a table of postcodes (around 1.7 million records) and has a postcode, longitude and latitude field.

The second which is a table of user data, which includes a postcode field - their postcode on registration.

 

I need to be able to determine which users fall within X radius of Y (another users postcode) without ideally running a query to compare distances with all 1.7 million postcodes to shortlist possibles.

 

I was thinking maybe it'd be possible to take Y users postcode and to use their longitude and latitude, doing some math (not my strong point) to determine all possible postcodes - by adjusting the longitude and latitude degrees relative to the distance being searched.

 

Where to start?

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now



×
×
  • Create New...