Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 2 of 2
  1. #1
    New to the CF scene
    Join Date
    Nov 2011
    Posts
    2
    Thanks
    0
    Thanked 0 Times in 0 Posts

    MySQL Programmer Needed for Discount Network Website

    I'm currently working on a new website for a discount network of professionals. The clients are asking for a couple additions that I can't figure out.

    First, they want a Zip Code Proximity search that will return the three closest professionals in the network database after the potential customer inputs their zip code on the site. It probably needs the use of the Haversine formula, I've found some code that does the calculation and have a zip code database, but I can't get it to work.

    Second, once the three closest professionals are revealed, they see discounted prices for each. If the customer likes the price, they select it and lock in the price by placing a down payment. This is straight forward (and I can do this myself) but next the clients want the customer brought to a detailed page of the three professionals.

    Let me know if anyone is interested and what your hourly and/or day rate is.

    Thanks,
    Harry

  • #2
    Supreme Master coder! Old Pedant's Avatar
    Join Date
    Feb 2009
    Posts
    25,032
    Thanks
    75
    Thanked 4,325 Times in 4,291 Posts
    You are supposed to post things like this in the "Web Projects" forum.

    Regarding need for haversine: No, not for zip codes. Haversine is only needed for extremely accurate results (e.g., to within 10 meters or so) and/or over long distances.

    Zip codes are horribly inaccurate indicators of actual latitude/longitude. (In my own zip code, the "center" as given by post office tables is actually 6.5 miles from my house.)

    So just using the pythagorean theorem is more than adequate for zipcode-based searches. (Again, unless you are talking distances of several hundred miles...I'd say 200 at a minimum, more likely 400.)

    Here an old demo on one of my web sites:
    http://www.clearviewdesign.com/Newbi...AndMapDemo.asp

    The "trick" to making the query efficient is storing the latitude/longitudes in *MILES*, not in degrees.

    On this page:
    http://www.clearviewdesign.com/clear...bie/demos.html
    there is a link to a zip file you can download and study.

    The code is written in ASP and uses an Access database, but the transformation to PHP and MySQL is pretty trivial.
    An optimist sees the glass as half full.
    A pessimist sees the glass as half empty.
    A realist drinks it no matter how much there is.


  •  

    Tags for this Thread

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •