Search code examples
phppropel

OR sentence example in PROPEL


im learning about propel, in documentation i found examples about WHERE/AND WHERE/IN but i cant found examples for WHERE/OR. How i can make this SQL in propel?

SELECT * FROM `users` WHERE `username`='carasuman' OR `email`='carasuman@host.com';

Thanks for help.


Solution

  • I guess it's because you didn't read the docs related to model criteria, where the OR-clause is covered in detail.

    http://www.propelorm.org/reference/model-criteria#combining_several_conditions