I’ve got a field in my table for tags on some content, separated by spaces, and at the moment I’m using:
SELECT * FROM content WHERE tags LIKE '%$selectedtag%'"
But if the selected tag is elephant, it will select content tagged with bigelephant and elephantblah etc…
How do I get it to just select what I want precisely?
If your table is
MyISAM, you can use this:, which can be drastically improved by creating a
FULLTEXTindex on it:, but will work even without the index.
For this to work, you should adjust
@@ft_min_wold_lento index tags less than 4 characters long if you have any.