I have a table that contains information such as names, email-addresses, numbers etc.
Let's pretend that I have 30 contacts by the same name but they all live in different cities . How do I split the comma and replace it with and ...
.
Example
SELECT * WHERE name %$searchString% OR city %$searchString%...
Now if $searchString
contains comma
SELECT * WHERE name %$searchString% OR city %$searchString%... AND SELECT * WHERE name %$searchString2% OR city %$searchString2%...
The $searchString2
contains information that's separated with comma.
Update
I want to search each row over and over again as many times as commas exist. I'm sorry that I can't explain myself