subSelect(); $subSelect->select( name )->from( 'table2' ); $q->select( '*' ) ->from( 'table1' ) ->where ( $q->expr->eq( 'name', $subSelect ) ); $stmt = $q->prepare(); $stmt->execute(); ?>
public function getQuery() { return '( ' . parent::getQuery() . ' )'; }