/** * Returns the SQL string for the subselect. * * Example: * <code> * <?php * $subSelect = $q->subSelect(); * $subSelect->select( name )->from( 'table2' ); * $q->select( '*' ) * ->from( 'table1' ) * ->where ( $q->expr->eq( 'name', $subSelect ) ); * $stmt = $q->prepare(); * $stmt->execute(); * ?> * </code> * * @return string */ public function getQuery() { return '( ' . parent::getQuery() . ' )'; }