Thread: Searching towns
View Single Post
Old 01-18-2008, 01:20 AM   #2 (permalink)
Boogle
Contributing Member
 
Join Date: 09-03-07
Location: England
Posts: 422
iTrader: 0 / 0%
Latest Blog:
None

Boogle is a jewel in the roughBoogle is a jewel in the roughBoogle is a jewel in the roughBoogle is a jewel in the roughBoogle is a jewel in the roughBoogle is a jewel in the rough
didn't see this before the last one!

Yes that is easily doable, what you're asking. However i'm not a PHP'er but the general idea for the database would be to create it as if you were plotting the cities/towns on a graph- so each town/city would be distance x away from the origin. and grid out this graph so each city would go in a grid reference, just a numbered block really.
then if someone searched for a city in block B, you would select all cities/towns in block B and the ones which were less than 50 miles difference away from point o (the origin) you would spit out to the client.

That's just the general idea- it will need tweaking but i'm pretty sure that would work. Also if you're new to SQL you might to read this

HTH's

Boog's
__________________
Great new 'June' Javascript Framework

June Forums - Innovative JScripting

Price is what you pay... Value is what you get.
Boogle is offline   Reply With Quote