public function Select::exists

Sets a condition that the specified subquery returns values.

Parameters

Drupal\Core\Database\Query\SelectInterface $select: The subquery that must contain results.

Return value

Drupal\Core\Database\Query\ConditionInterface The called object.

Overrides ConditionInterface::exists

File

drupal/core/lib/Drupal/Core/Database/Query/Select.php, line 219
Definition of Drupal\Core\Database\Query\Select

Class

Select
Query builder for SELECT statements.

Namespace

Drupal\Core\Database\Query

Code

public function exists(SelectInterface $select) {
  $this->where
    ->exists($select);
  return $this;
}