I'm trying to create an SQL-query similar to this:
(type1 OR type2) AND (cityname1 OR cityname2)
I've come up with something like this.
https://gist.github.com/anonymous/6d76e1f49a1111fe34c4
But this seems to result in a similar to this:
... AND type1 OR type2 AND cityName1 OR cityName2
Which gives me the wrong results. Any ideas?