xPDOQuery.join
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::join¶
Adds a join clause to the query with an explicit join type. The dedicated methods innerJoin(), leftJoin() and rightJoin() are shorter forms of this method.
Syntax¶
xPDOQuery join (string $class, [string $alias = ''], [string $type = xPDOQuery::SQL_JOIN_CROSS], [mixed $conditions = array()], [string $conjunction = xPDOQuery::SQL_AND], [mixed $binding = null], [integer $condGroup = 0])
$type accepts the class constants SQL_JOIN_CROSS, SQL_JOIN_LEFT, SQL_JOIN_RIGHT, SQL_JOIN_NATURAL_LEFT, SQL_JOIN_NATURAL_RIGHT and SQL_JOIN_STRAIGHT.
Example¶
$query = $xpdo->newQuery('Box');
$query->join('Owner', 'Owner', xPDOQuery::SQL_JOIN_LEFT, array('Owner.id:=' => 'Box.owner_id'));
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










