Re: any place I can get a advance search function script written in PHP?



On Wed, 29 Jun 2005 01:01:18 -0700, nortelsale wrote:

> i have a site that allow people to post for sale, for rent info, I want to
> have advanced search function that can search all the posting (in my site)
> by zip code, and by certain miles say 10, 20 miles within a zip code?
>
> My site is written in PHP with a mySQL database.

I take it you already know how to search with select.

select* from mytable where zip = ????;

For such a site relying on searches of this kind it is worth having
multiple indexes set on the table, almost per field. Increasing the
number of indexes reduces data writes speed (hardly noticeable on a web
application), but increases speed on searches.

The mileage search, they are tables available, I haven't worked on a US
one, but the BT one was readily available on their web site for UK
postcode areas. I suspect the US postal services has one too.

Ours works in areas using the first part of the code, ex DH24 for an area
in Durham and has the distance to each other area (like one of those
triangular distance maps). The one I saw was already in the form of a
lookup table.

I remember also someone talking at that time of setting it as a matrix,
which would make finding surrounding areas easy (i.e. just subtract from
the matrix those that are not in distance).

.



Relevant Pages

  • Re: Rating cell phone calls [telecom]
    ... regardless of time, out to 15 miles, they're still a 'local' call, ... distance-related charge scheme, but the distance is taken from the point ... we had another change in local calling rates. ... I have a vague recollection of when pay phone rates were raised from 25 ...
    (comp.dcom.telecom)
  • Re: Rating cell phone calls [telecom]
    ... of time, out to 15 miles, they're still a 'local' call, but you _are_ billed ... distance-related charge scheme, but the distance is taken from the point ... There is/was a fourth band 'D', ... were merged into an untimed calling area for residential, ...
    (comp.dcom.telecom)
  • Re: Rating cell phone calls [telecom]
    ... of time, out to 15 miles, they're still a 'local' call, but you _are_ billed ... choices among measured service with units, a pre-paid local calling area ... and distance rated) or a larger pre-paid local calling area with calls ...
    (comp.dcom.telecom)
  • Re: OOTT://In case it is important to you.
    ... I set a Personal Record for running distance I've been trying ... Hey, what did you hit. ... I did run my first marathon this year at 62, didn't do so hot, ... I ran 10 miles yesterday. ...
    (rec.woodworking)
  • 2006 Region 8 Contest - Day 5
    ... This was to give the pilots a little more chance to find lift ... pilots had a pretty tough time within 15 miles of Ephrata but once out ... handicapped speed of 52 mph and a distance of 164.16 miles ...
    (rec.aviation.soaring)