I am wondering how or/and works?
For example if I want to get all rows where display = 1
I can just do WHERE tablename.display = 1
and i
You need to use brackets for your multiple OR conditions. And for display = 1 OR display = 2 you can use display IN(1,2). Try this:
SELECT * FROM tableName
WHERE display IN (1,2)
AND (content LIKE "%hello world%"
OR tags LIKE "%hello world%"
OR title LIKE "%hello world%")
For more info look at MySQL: Operator Precedence