www.webdeveloper.com
Recent Articles
  • Finding Slow Running Queries in ASE 15
  • A More Advanced Pie Chart for Analysis Services Data
  • Adobe AIR Programming Unleashed: Working with Windows
  • Performance Testing SQL Server 2008's Change Data Capture Functionality
  • The ABC's of PHP: Introduction to PHP
  • How to Migrate from BasicFiles to SecureFiles Storage
  • Why the Twitter Haters Are Wrong
  • User Personalization with PHP: Beginning the Application
  • Whats in an Oracle Schema?
  • Lighting Enhancement in Photoshop
  •  

    Go Back   WebDeveloper.com > Client-Side Development > General

    General Discussion and support for your general issues associated with web design.

    Reply
     
    Thread Tools Search this Thread Rate Thread Display Modes
      #1  
    Old 01-20-2006, 07:22 PM
    angel198561 angel198561 is offline
    Registered User
     
    Join Date: Jan 2006
    Posts: 4
    Zip Code Search on Website to Locate Members Closest

    Okay you know how when you go to a company website and they have a store locator where you enter in your zip code or city and it finds the closes store too you?? On our website we have a member directory and at times we need to find out which member is the closest to a certain zip code or city. The member directory all ready has this information but you would have to search through all of the entries and that is becoming time consuming. How do you put a locator that will search these entries for you and return the closest people to a location?? Thanks in advance.
    Reply With Quote
      #2  
    Old 01-20-2006, 11:20 PM
    NogDog's Avatar
    NogDog NogDog is offline
    High Energy Magic Dept.
     
    Join Date: Aug 2004
    Location: Ankh-Morpork
    Posts: 13,646
    You'd probably need a database of zipcodes with the latitude and longitude for each. Then you'd probably do a query of all zip codes whose latitude is within x minutes of latitude and y minutes of longitude of the zip code of interest. Then you'd loop through each of those and do some spherical trigonometry to determine which of them is within the desired distance of the zip code of interest.
    __________________
    "That's what the gods are! An answer that will do! Because there's food to be caught and babies to be born and life to be lived and so there is not time for big, complicated, and worrying answers! Please give us a simple answer, so that we don't have to think, because if we think, we might find answers that don't fit the way we want the world to be." -- from Nation, by Terry Pratchett
    freelancer.internet.com
    Email me
    Reply With Quote
    Reply

    Bookmarks


    Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
     
    Thread Tools Search this Thread
    Search this Thread:

    Advanced Search
    Display Modes Rate This Thread
    Rate This Thread:

    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 Off
    HTML code is Off
    Forum Jump


    All times are GMT -5. The time now is 10:58 PM.



    Acceptable Use Policy

    internet.comMediabistrojusttechjobs.comGraphics.com

    WebMediaBrands Corporate Info


    Advertise | Newsletters | Feedback | Submit News

    Legal Notices | Licensing | Permissions | Privacy Policy

    Powered by vBulletin® Version 3.7.3
    Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.