Forums

Complex conditions in DB Read

anne1979 28 Apr, 2016
Hello again,
Anne here😉

I found valuable help in this:
http://www.chronoengine.com/faqs/72-ccv5/5215-how-do-i-build-a-where-statement-in-ccv5.html

But another question is coming up:
If I want to write complex conditions like so:
model.column1 = valueA OR model.column2 = valueB

How can I do this?

The example in the page mentioned above shows what you need to do if you want to select db entries with different values for 1 column, but not for 2 or more columns...

Thank you again for your kind help,
Anne

P.S. Promising to buy you some coffee, soon😉
anne1979 28 Apr, 2016
Or, in addition to the question above:

How can I set conditions for
(model.column1 = valueA AND model.column2 = valueB) OR (model.column1 = valueA AND model.column2 = valueC)


Maybe its too simply, but I don't see it...
GreyHead 28 Apr, 2016
Hi Anne,

The : syntax in the last section of the FAQ should work for this.

Bob
anne1979 28 Apr, 2016
Hi Bob,

#note-to-self: go and get new glasses😉

Thank you.
This topic is locked and no more replies can be posted.