I'm building a membership-based site for real estate professionals. I want to be able to list all of the agents in a particular city and state, based on what each agent says when he signs up.
What I'm concerned about is that even if two agents work in the same city, they might not type _exactly_ the same thing into the city box. There could be alternate spellings, or typos, or questionable punctuation, etc.
What I want to do is keep a database table of all cities where there are members, and to reference a city_id in the membership table. Then when an agent signs up from a city where there are already members, it would just reference the row that's already in the table.
So what I need to do is to find a good way to recognize the close, but not exact, matches. For instance, if there is a city in my database named "", and someone signs up from a city named "", and both cities are in the same state, I want to be able to recognize that those are actually the same cities.
Any suggestions?
Thanks,
Keegan
What I'm concerned about is that even if two agents work in the same city, they might not type _exactly_ the same thing into the city box. There could be alternate spellings, or typos, or questionable punctuation, etc.
What I want to do is keep a database table of all cities where there are members, and to reference a city_id in the membership table. Then when an agent signs up from a city where there are already members, it would just reference the row that's already in the table.
So what I need to do is to find a good way to recognize the close, but not exact, matches. For instance, if there is a city in my database named "", and someone signs up from a city named "", and both cities are in the same state, I want to be able to recognize that those are actually the same cities.
Any suggestions?
Thanks,
Keegan