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 if I want all rows where display = 1 or 2
I can just do WHERE tablename.display = 1 or tablename.display = 2
But what if I want to get all rows where display = 1 or 2 and where any of the content, tags, or title contains hello world
How would the logic play out for that?
Select * from tablename
where display = 1 or display = 2 and content like "%hello world%" or tags like "%hello world%" or title = "%hello world%"
Would be my guess. but then I can read that in several ways.
Does it read out as:
(display = 1 or display = 2) and (content like "%hello world%" or tags like "%hello world%" or title = "%hello world%")
or as
((display = 1 or display = 2) and (content like "%hello world%")) or (tags like "%hello world%" or title = "%hello world%")
etc.