Skip to main content
Drupal API
User account menu
  • Log in

Breadcrumb

  1. Drupal Core 11.1.x
  2. Select.php

function Select::countQuery

Overrides SelectInterface::countQuery

File

core/lib/Drupal/Core/Database/Query/Select.php, line 723

Class

Select
Query builder for SELECT statements.

Namespace

Drupal\Core\Database\Query

Code

public function countQuery() {
    $count = $this->prepareCountQuery();
    $query = $this->connection
        ->select($count, NULL, $this->queryOptions);
    $query->addExpression('COUNT(*)');
    return $query;
}

API Navigation

  • Drupal Core 11.1.x
  • Topics
  • Classes
  • Functions
  • Constants
  • Globals
  • Files
  • Namespaces
  • Deprecated
  • Services
RSS feed
Powered by Drupal