Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 2 of 2
11-16-2011, 12:24 AM #1
- Join Date
- Nov 2011
- 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.
11-16-2011, 01:28 AM #2
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:
The "trick" to making the query efficient is storing the latitude/longitudes in *MILES*, not in degrees.
On this page:
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.