You are here

public function Select::having in Zircon Profile 8

Same name and namespace in other branches
  1. 8.0 core/lib/Drupal/Core/Database/Query/Select.php \Drupal\Core\Database\Query\Select::having()

Adds an arbitrary HAVING clause to the query.

Parameters

$snippet: A portion of a HAVING clause as a prepared statement. It must use named placeholders, not ? placeholders.

$args: (optional) An associative array of arguments.

Return value

$this

Overrides SelectInterface::having

File

core/lib/Drupal/Core/Database/Query/Select.php, line 292
Contains \Drupal\Core\Database\Query\Select.

Class

Select
Query builder for SELECT statements.

Namespace

Drupal\Core\Database\Query

Code

public function having($snippet, $args = array()) {
  $this->having
    ->where($snippet, $args);
  return $this;
}