By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
464,750 Members | 1,090 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 464,750 IT Pros & Developers. It's quick & easy.

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

P: n/a
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.

Jul 17 '05 #1
Share this Question
Share on Google+
1 Reply

P: n/a
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).

Jul 17 '05 #2

This discussion thread is closed

Replies have been disabled for this discussion.