Excuse the terrible question title.
I have this PHP string and want to check a MySQL database for the existence of any of its contents.
Awanto 3/Makam/Lone
I want to check if any of the names in the string (i.e Awanto 3, Makam OR Lone) exist in a table in my DB. There will never be a case where ‘Awanto 3/Makam/Lone’ exists but there will probably be a case where either ‘Awanto 3’, ‘Makam’ or ‘Lone’ exists.
Table name is ‘artists’, column that will be checked is ‘artist’
I will be doing this for around hundreds of these queries every day and there are 2-3000 rows in the ‘artists’ table.
What is the best way to do this?
Thanks!
Since the string parts between the delimiters are the complete artist, not only a part of it, I’d do something like