------------------------------------------------------------------------------------------------------------------------ -- SOUNDEX ------------------------------------------------------------------------------------------------------------------------ SELECT m.id, m.first_name, m.last_name, (SELECT group_concat( concat( CONVERT( m2.id, CHAR( 10 ) ) , ' ', m2.first_name, ' ', m2.last_name ) ) FROM `mn_Member` AS m2 WHERE m2.id != m.id AND m2.last_name SOUNDS LIKE m.last_name AND m2.first_name SOUNDS LIKE m.first_name ) AS `names` FROM `mn_Member` AS m WHERE 1 AND EXISTS ( SELECT 1 FROM `mn_Member` AS m2 WHERE m2.id != m.id AND m2.last_name SOUNDS LIKE m.last_name AND m2.first_name SOUNDS LIKE m.first_name LIMIT 1 ) LIMIT 0, 30; ------------------------------------------------------------------------------------------------------------------------ -- EXECT MATCH ------------------------------------------------------------------------------------------------------------------------ SELECT m.id, m.first_name, m.last_name, (SELECT group_concat( concat( CONVERT( m2.id, CHAR( 10 ) ) , ' ', m2.first_name, ' ', m2.last_name ) ) FROM `mn_Member` AS m2 WHERE m2.id != m.id AND m2.last_name = m.last_name AND m2.first_name = m.first_name ) AS `names` FROM `mn_Member` AS m WHERE 1 AND EXISTS ( SELECT 1 FROM `mn_Member` AS m2 WHERE m2.id != m.id AND m2.last_name = m.last_name AND m2.first_name = m.first_name LIMIT 1 ) LIMIT 0, 30;