eZ\Publish\Core\Persistence\Doctrine\SubselectDoctrineQuery::subSelect PHP Method

subSelect() public method

Used for making subselects inside subselects. Example: subSelect(); $subSelect->select( name ) ->from( 'table2' ) ->where( $subSelect->expr->in( 'id', $subSelect->bindValue( $value ) ) ); $q->select( '*' ) ->from( 'table1' ) ->where ( $q->expr->eq( 'name', $subSelect ) ); $stmt = $q->prepare(); // the $value is bound to the query. $value = 4; $stmt->execute(); // subselect executed with 'id = 2' ?>
public subSelect ( ) : eZ\Publish\Core\Persistence\Database\SelectQuery
return eZ\Publish\Core\Persistence\Database\SelectQuery
    public function subSelect()
    {
        return new self($this->outerQuery);
    }