Hey everyone. I am currently using php to search a zip code database and display results by radius. Lately I have been considering a "search by city name" feature as well. I do have some general ideas on how to go about it, but I would like know if someone has a proven method of integrating the feature. I appreciate any feedback.
If your zip code database has city names, then it's just 1 query. SELECT * FROM $zipdb WHERE city='$city'; Where $city is the city name entered by the searcher, and $zipdb is the table name. Alternatively, you can also use: SELECT * FROM $zipdb WHERE city LIKE '%$city%'; which will probably output more general results, depending on what is being searched for... Hope that helps you. Bye