search routine based on postcode (in australia)
Posted: Sun Oct 02, 2005 9:16 pm
Apologies if this is the incorrect forum to ask this question. I'm basically asking for advice on how this kind of thing works.
I have a set of users (car nuts) and i want to have them have the ability to search each other. Currently i have their Postcodes and location (they are legit postcodes as I do a check when they signup).
This is how the data looks (I'm using MySQL and PHP):
So not only do I have the postcode I also have the description of the location (the (QLD) is the state, in this case, Queensland)).
So the question is, how can I determine how far away postcode 4000 is from 4001 (brisbane city to a brisbane suburb), or 4000 from 2000 (brisbane to sydney)?
I'm going to offer them the standard, find me a car nut with X car who is Y Kms from postcode Z.
Any advice lapped up, this one's going to REALLY stretch me.
Rob
EDIT: I did find this: http://www.findmap.com.au/pcdist.html but am not sure if it's the way to go, first of all it's massive, and secondly, I'd like to see if i CAN do it myself before going this route.... If I have to I have to, but 5million records in a database file to keep track of distances seems, intense.... (shrug)
I have a set of users (car nuts) and i want to have them have the ability to search each other. Currently i have their Postcodes and location (they are legit postcodes as I do a check when they signup).
This is how the data looks (I'm using MySQL and PHP):
Code: Select all
id - postcode - location - popularity
1 - 4000 - Brisbane (QLD) - 0So the question is, how can I determine how far away postcode 4000 is from 4001 (brisbane city to a brisbane suburb), or 4000 from 2000 (brisbane to sydney)?
I'm going to offer them the standard, find me a car nut with X car who is Y Kms from postcode Z.
Any advice lapped up, this one's going to REALLY stretch me.
Rob
EDIT: I did find this: http://www.findmap.com.au/pcdist.html but am not sure if it's the way to go, first of all it's massive, and secondly, I'd like to see if i CAN do it myself before going this route.... If I have to I have to, but 5million records in a database file to keep track of distances seems, intense.... (shrug)