You are here

public function SelectQueryExtender::countQuery in Drupal 7

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

Return value

SelectQueryInterface A new SelectQuery object with no fields or expressions besides COUNT(*).

Overrides SelectQueryInterface::countQuery

1 method overrides SelectQueryExtender::countQuery()
SearchQuery::countQuery in modules/search/search.extender.inc
Builds the default count query for SearchQuery.

File

includes/database/select.inc, line 795

Class

SelectQueryExtender
The base extender class for Select queries.

Code

public function countQuery() {
  return $this->query
    ->countQuery();
}