eZ\Publish\Core\Persistence\Doctrine\SelectDoctrineQuery::innerJoin PHP Method

innerJoin() public method

This method could be used in two forms: innerJoin( 't2', $joinCondition ) Takes 2 string arguments and returns \eZ\Publish\Core\Persistence\Database\SelectQuery. The first parameter is the name of the table to join with. The table to which is joined should have been previously set with the from() method. The second parameter should be a string containing a join condition that is returned by an \eZ\Publish\Core\Persistence\Database\SelectQueryExpression. Example: the following code will produce the SQL SELECT id FROM t1 INNER JOIN t2 ON t1.id = t2.id $q->select( 'id' )->from( 't1' )->innerJoin( 't2', $q->expr->eq('t1.id', 't2.id' ) ); innerJoin( 't2', 't1.id', 't2.id' ) Takes 3 string arguments and returns \eZ\Publish\Core\Persistence\Database\SelectQuery. This is a simplified form of the 2 parameter version. innerJoin( 't2', 't1.id', 't2.id' ) is equal to innerJoin( 't2', $this->expr->eq('t1.id', 't2.id' ) ); The first parameter is the name of the table to join with. The table to which is joined should have been previously set with the from() method. The second parameter is the name of the column on the table set previously with the from() method and the third parameter the name of the column to join with on the table that was specified in the first parameter. Example: the following code will produce the SQL SELECT id FROM t1 INNER JOIN t2 ON t1.id = t2.id $q->select( 'id' )->from( 't1' )->innerJoin( 't2', 't1.id', 't2.id' );
public innerJoin ( ) : eZ\Publish\Core\Persistence\Database\SelectQuery
return eZ\Publish\Core\Persistence\Database\SelectQuery
    public function innerJoin()
    {
        return $this->doJoin('INNER', func_get_args());
    }