I have a mysql clients table which stores a bunch of info on the client, for the sake of this question let's say:
firstName
lastName
houseName
streetName
localityName
The system has an address labels generator to send promotional material to my clients' home (Yes, they request this not junk mail :) ) and I would like to avoid sending multiples to any one address. Basically if a husband and a wife are both in the system and having a very similar address, I don't want to print both.
Now obviously since the system relies on the operator, a street name can be inputted as "John Doe Str." or "John Doe Street" or "John Doe str" or the house name can be inputted in a different manner such as "531, House Name" or "House Name 531" etc.
What I'm after is a an idea (If it's even possible) to build either a query, or some php code that would try to figure out as accurately as possible if it's the same address (taking into account all address fields) and possibly use the surname as a possible reference as it might indicate that two people are living in the same household that share a surname and a very similar address.
What do you guys think? I might be way over my head with this one.