Project

General

Profile

How to get OR condition with where( ).bind() in wt::dbo?

Added by Rathnadhar K V almost 4 years ago

Namaskara,

With where("a = ?").bind(1).where("b = ?").bind(2); we can achieve AND CONDITION ==> where a = 1 AND b = 2.

I want achieve where a = 1 OR b = 2.

How is it possible?

Regards

Rathnadhar K V


Replies (1)

RE: How to get OR condition with where( ).bind() in wt::dbo? - Added by Roel Standaert almost 4 years ago

You'll just have to use or in your string literal:

where("a = ? or b = ?").bind(1).bind(2)

Regards,

Roel

    (1-1/1)