Yamaha32088 Posted March 4, 2008 Share Posted March 4, 2008 I want everyones professional opinion on this subject. I want to create a search function for a website I am designing the user would select a category (I.E-"Computer Stores") The user would then be brought to a page to search by City, State, Zip code. I already have a database that has all the U.S States, City's, and Zip codes. What I want to know is how would I setup my database/PHP page to be able to search for a precise/category of a company in a Zip code, State, or City. There will be hundreds of company's in various Zip codes. I guess my question is how would i pinpoint hundreds of records to a single zip code then organize them by category for a desired result. I hope I have been clear enough to generate some detailed and helpful responses. I will also post this in the MySQL forum since it fits under both category's. Quote Link to comment Share on other sites More sharing options...
ohdang888 Posted March 4, 2008 Share Posted March 4, 2008 My opinion: i got a headache even reading that. I'm not a php expert, but i'm fairly certain that would definitely require one. If you're a business, i highly suggest hiring someone to do that. unless you're really really good at php, its gonna take forever to build that. Quote Link to comment Share on other sites More sharing options...
jandrews3 Posted March 4, 2008 Share Posted March 4, 2008 That's not difficult. It'll just take time. Your database will need to contain all information regarding each business, including a category or categories. You will need a database with sufficient variables to cover all data regarding any business. You may want to assign more than one category variable to each business (i.e.: Walmart cannot be categorized as just a computer store, but they should certainly come up in the listing). Perhaps using a numerical code (1-computer, 2-food service, 3-clothing, 4-superstore (Walmart), 5-etc....) could be used to reference each category. I don't envy you this job. A category code 50 or 60 long might be necessary to cover all possible business types you'll be serving. Searches done by the user returns only those businesses with the respective category code. I hope this helps. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.