$q = new ezAbstractCoolQuhttp://pastebin.ca/comments.php?bin_id=344158 comment on this postery(); $q-> select('*')-> where()-> col('x')-> op('=')-> val('y')-> op('OR')-> startGroup()-> col('y')-> op('>=')-> val(110)-> endGroup()-> execute(); produces: SELECT * FROM `table` WHERE x=y OR (y>=110);