function SelectInterface::countQuery

Same name in other branches
  1. 9 core/lib/Drupal/Core/Database/Query/SelectInterface.php \Drupal\Core\Database\Query\SelectInterface::countQuery()
  2. 8.9.x core/lib/Drupal/Core/Database/Query/SelectInterface.php \Drupal\Core\Database\Query\SelectInterface::countQuery()
  3. 10 core/lib/Drupal/Core/Database/Query/SelectInterface.php \Drupal\Core\Database\Query\SelectInterface::countQuery()

Get the equivalent COUNT query of this query as a new query object.

Return value

\Drupal\Core\Database\Query\SelectInterface A new SelectQuery object with no fields or expressions besides COUNT(*).

2 methods override SelectInterface::countQuery()
Select::countQuery in core/lib/Drupal/Core/Database/Query/Select.php
Get the equivalent COUNT query of this query as a new query object.
SelectExtender::countQuery in core/lib/Drupal/Core/Database/Query/SelectExtender.php
Get the equivalent COUNT query of this query as a new query object.

File

core/lib/Drupal/Core/Database/Query/SelectInterface.php, line 477

Class

SelectInterface
Interface definition for a Select Query object.

Namespace

Drupal\Core\Database\Query

Code

public function countQuery();

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.