I suspect this may not be doable, but I figured I'd try anyway.
In a MySQL database, one of the columns related
is a comma-separated list of values: bob,sally,james,rick
.
For a given row, the number of items in this column is variable.
Now, if I want to do a soundex search against all the items in that column (client request well after this db has been established and integrated), how would I go about this? I'd want to write something like
SELECT `primary` FROM `table` WHERE `related`.split(",").any() SOUNDS LIKE sample
Which is plainly nonsense code but hopefully conveys the idea.
Essentially, explode/split a CSV field into individual values to SOUNDEX
compare. If I have to get all those related
fields, explode them and then soundex()
them individually in a PHP foreach()
loop so be it (that language isn't really important, it could be Python, too, with just a touch more effort), but I'd love to avoid it if possible.