xPDO.newQuery
xPDO::newQuery
Creates an new xPDOQuery for a specified xPDOObject class.
Syntax
API Docs: http://api.modxcms.com/xpdo/xPDO.html#newQuery
xPDOQuery newQuery (string $class, [mixed $criteria = null], [boolean|integer $cacheFlag = true])
Examples
Create a new Query for the Box object:
$xpdo->newQuery('Box');
Create a new Query for the Box object, but already add a WHERE clause limiting to Boxes with width greater than 10:
$xpdo->newQuery('Box',array( 'width:>' => 10, ));
See Also
Suggest an edit to this page on GitHub (Requires GitHub account. Opens a new window/tab).