i need to submit a query to search posts with a specific tag. the cell in the database is written this way : “funny tech good” so every word describe a tag. so i have writed this code in order to get a posts with the “funny” tag.
'SELECT * FROM `posts` WHERE `post_tag` = "funny" ORDER BY `post_id` DESC LIMIT 50'
unfortunately , it gives me no result. what is the problem in here?
Use the
LIKEkeyword or store your tags in a 1-tag-per-entry fashion.This will however find tags, that have other tags included, so a search for “java” will also find “javascript”,