xPDOQuery.command
Last updated not available | Page history | Improve this page | Report an issue
Support the team building MODX with a monthly donation.
The budget raised through OpenCollective is transparent, including payouts, and any contributor can apply to be paid for their work on MODX.
Backers
Budget
$194 per month—let's make that $500!
Learn morexPDOQuery::command¶
Sets the SQL command the query will execute. Valid values are SELECT (the default), UPDATE and DELETE. For UPDATE and DELETE the class alias is reset to the table name, because those statements do not use column aliases.
Syntax¶
xPDOQuery command ([string $command = 'SELECT'])
Example¶
$query = $xpdo->newQuery('Box');
$query->command('DELETE');
$query->where(array('width:<' => 10));
$xpdo->exec($query->toSQL());
See Also¶
Support the team building MODX with a monthly donation.
The budget raised through OpenCollective is transparent, including payouts, and any contributor can apply to be paid for their work on MODX.
Backers
Budget
$194 per month—let's make that $500!
Learn more










