I'm trying to build a query to use for a search engine, that would look like this one:
SELECT * FROM sometable
WHERE col1 = 1 AND col2 = 2 AND (col3a = 3 OR col3b = 3 OR col3c = 3)
I though the code below would work:
SubSonic.Query query = new SubSonic.Query("sometable");
query = query.WHERE("col1", 1);
query = query.WHERE("col2", 2);
query = query.AND("col3a = " + 3).
OR("col3b = " + 3).
OR("col3c = " + 3);
but it doesn't as it results in something like this:
SELECT * FROM sometable
WHERE col1 = 1
AND col2 = 2
AND col3a = 3
OR col3b = 3
OR col3c = 3
How can I build a query I need?