I am struggling with writing a MYSQL query in PHP that can find an exact match with one item in a comma delimited string. Note, for various reasons I cannot change the data model
Musicians
id|artist
1|beatles
2|rolling stones
$searchterm = "beatles"
It is easy to match the string exactly with:
WHERE artist = '$searchterm'
How could I determine an exact match in the following
Musicians
id|artist
1|beatles,the beatles,the fab four,fab four,fab for
2|rolling stones,the rolling stones,stones,the stones
$searchterm = "fab four"
//something like the following although it does not work
WHERE $searchterm IN artist
Thanks for any suggestions