I've been handed an interestng PHP/MySQL task: 

A DB table has two columns we are interested in - first_name and last_name

The same person may be listed multiple times

The spelling of the names may not be identical in every entry. i.e. we may have 
'James'+'Smith', 'Jim'+'Smith', 'James J'+'Smythers Jr', 'John'+'Smythe' OR 
'Chris'+'Robin', 
'Cris'+'Robin', 'Christopher'+'Robbins', 'Christine'+'Robinson'

We want to list all the possible entries for any individual, excluding obvious 
mismatches 
but including marginal cases, so from the first list above we'd exclude John 
Smythe but 
would want to see all the others if looking for Jim Smyth, in the second we'd 
prefer to 
exclude Christine Robinson but include the others if looking for Christopher 
Robin.

A match on the initial letters is much too loose, an exact match is too 
stringent. We're 
looking for the middle ground, erring (but not too far) on the generous side.

Any ideas?

Thanks in advance for any light you may be able to shed.

Andrew

Reply via email to