ElementCriteriaModel combine with 'and' and 'or' filters Saying I want to convert the following SQL query into ElementCriteriaModel:

SELECT * FROM users WHERE fieldA = 1 AND (fieldB = 1 or fieldC = 1)


I can't find a way in ElementCriteriaModel to do so.

{% craft.users({
    fieldA: 1,
    fieldB: 1,
    fieldC: 1, // where can we put the 'or' filter?
}) %}


I can do this using DbCommand, but just curious if there's anyway we can do that via ElementCriteriaModel?
I suspect you're looking for this section on passing parameters to ElementCriteriaModels, in the docs.

The examples fail to highlight one aspect of the query you're building, but I think you'll find the same strategies hold up for many field values, as well as basic Element properties (like id, title, etc.)

For example…

craft.users({ myFieldA: [1, 2, 3] }).all()


…will fetch User Elements with the custom myFieldA matching the values 1, 2, or 3. The or is implicit!