xPDO.getSelectColumns
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
$185 per month—let's make that $500!
Learn morexPDO::getSelectColumns¶
Builds a comma-delimited list of the columns to select for a class, optionally qualified with a table alias and a column prefix. This is the list that xPDOQuery::select() expands when it receives '*'.
Syntax¶
string getSelectColumns (string $className, [string $tableAlias = ''], [string $columnPrefix = ''], [array $columns = array()], [boolean $exclude = false])
$className— the class whose columns to list.$tableAlias— optional alias to qualify each column with.$columnPrefix— optional prefix added to each column name (used to avoid collisions when joining).$columns— an explicit list of columns; if empty, all fields of the class are used.$exclude— when true, the listed columns are excluded rather than selected.
Example¶
$columns = $xpdo->getSelectColumns('Box', 'Box', 'Box_');
// Box.id, Box.name, Box.width, ...
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
$185 per month—let's make that $500!
Learn more










