Forum Moderators: open
For example when i access mysite.com/pages?page=1 then suppose it's tags are life,confidence,success,honesty
Now below the actual article content i want to show all the articles avaiable in the database WHICH HAVE ANY ONE OF THE TAGS OR MORE TAGS ASSOCIATED WITH IT. That means any other article (in same table) should be displayed which have the same tag associated witrh them
Table name: articles
Database name: mysqldb
So how do i write the search query?
SELECT DISTINCT id FROM wow WHERE 0 OR CONCAT(title,content,views,'') LIKE '%$row['tags']%' ORDER BY id DESC;
But the tags which are stored in db are separated by commas example life,success,destiny (can be any number of tags separated by comma)
and if i write $row['tags'] it will take it as a complete string and try to match which will give the article itself as a result of search query.
I want to search wow table if any of the articles (other than the current) have tags keyword "life" , "success" , "destiny" all three or any of the one then only those results should be displayed