comparing tables based on user names
Posted on 2011-10-18
Working with MYSQL
TableA has a field called 'username'
contents of it is "Tyson, Mike" (last name separated from first name by a coma)
TableB has two fields called 'firstname' & 'lastname'
content of each field are 'Mike' & 'Tyson' respectively
I want to cycle through TableA looking for potential matches with TableB
Where the names can be matched (Tyson, Mike in TableA with Mike Tyson in tableB)
I want to flag a field called Status in TableB as 2 (integer)
Where the person in TableA can't be matched
I want to flag a field called Status in TableA as 0 (integer)