Created
January 15, 2018 11:36
-
-
Save davidpede/905cb465cdbd655cd087f5e1f25fb37d to your computer and use it in GitHub Desktop.
XPDO where examples
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$query = $this->modx->newQuery('modUser'); | |
//checks | |
$query->where(array( | |
'active' => 1, | |
'Profile.blocked' => 0 | |
)); | |
//by usergroup | |
$query->where(array('primary_group:IN' => array(1,2,3))); | |
//by id | |
$query->where(array('id:IN' => array(1,2,3)),xPDOQuery::SQL_OR); //<-- uses OR condition |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment