Programming Forums
User Name Password Register
 

RSS Feed
FORUM INDEX | TODAY'S POSTS | UNANSWERED THREADS | ADVANCED SEARCH

Reply
 
Thread Tools Display Modes
Old Dec 9th, 2005, 12:23 AM   #1
wildkarde
Newbie
 
Join Date: Dec 2005
Posts: 1
Rep Power: 0 wildkarde is on a distinguished road
Not sure what to search for, help please

Hi, I am looking for a script that will allow me to search my web database for the closest "retailer"

You've seen these on manufacturer sites where you enter in your zip code and tell it how many miles you are willing to drive and it gives you a list of whoever in return that meet that criteria.

The problem is I have no idea what this type of script is called or if anyone has something available for purchase and so on. Can anyone out there give me a hand with this please?
Thanks!
wildkarde is offline   Reply With Quote
Old Feb 19th, 2006, 6:14 PM   #2
asp1
Newbie
 
Join Date: Feb 2006
Posts: 7
Rep Power: 0 asp1 is on a distinguished road
I suppose you would search for a retailer zip that equals the requested zip then trim a letter from the right of the zip and search for that until it comes up with something.

I'm not pro but would be happy to help you out with that (or is the suggested logic enough for you to have a go?)
asp1 is offline   Reply With Quote
Old Dec 1st, 2006, 6:33 PM   #3
mackenga
Professional Programmer
 
Join Date: Mar 2005
Location: Glasgow, Scotland
Posts: 321
Rep Power: 4 mackenga is on a distinguished road
asp1: sounds like an interesting solution. Mostly, where you see this sort of functionality on a website they use a database of rough geographical locations for the ZIP / postal code and a bit of basic geometry, though some of them are even smarter and use route-planning tricks behind the scenes to find a distance that isn't just as the crow flies.

asp1's suggestion does sound like a nice, efficient, simple, tidy hack that would often do just as well though. You might be interested to know it should work equally well with UK postal codes, despite their completely different looking format. I wonder how many nations' area designations this same trick would work for?
__________________
"I'm not a genius. Why do I have to suffer?"
mackenga is offline   Reply With Quote
Reply

Bookmarks

« Previous Thread in Forum | Next Thread in Forum »

Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump




DaniWeb IT Discussion Community
All times are GMT -5. The time now is 9:55 PM.

Powered by vBulletin® Version 3.7.0, Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Copyright ©2007 DaniWeb® LLC