I have a database of books. There is a Tag field that contains multiple tags and the number of tags isn't the same. So we have something like that in two rows:
comics,history
art,science,tag3,tag4
Now I have a string like $stringtosearch which can be any combinations of tags with that structure.
tag1,tag2... (it is with comma and I don't know the number of tags or commas...).
So how should I write the select query for that search?
NOTE: I want for example if user searches a string that contains 2 tags ,display records which has all two tags and not only one of them