public function PagerDefault::setCountQuery

cis7 pager.inc public PagerDefault::setCountQuery(SelectQueryInterface $query)
cle7 pager.inc public PagerDefault::setCountQuery(SelectQueryInterface $query)
elmsmedia7 pager.inc public PagerDefault::setCountQuery(SelectQueryInterface $query)
icor7 pager.inc public PagerDefault::setCountQuery(SelectQueryInterface $query)
meedjum_blog7 pager.inc public PagerDefault::setCountQuery(SelectQueryInterface $query)
mooc7 pager.inc public PagerDefault::setCountQuery(SelectQueryInterface $query)

Specify the count query object to use for this pager.

You will rarely need to specify a count query directly. If not specified, one is generated off of the pager query itself.

Parameters

SelectQueryInterface $query: The count query object. It must return a single row with a single column, which is the total number of records.

File

includes/pager.inc, line 106
Functions to aid in presenting database results as a set of pages.

Class

PagerDefault
Query extender for pager queries.

Code

public function setCountQuery(SelectQueryInterface $query) {
  $this->customCountQuery = $query;
}
Error | ELMSLN API

Error

×

Error message

  • Warning: Cannot modify header information - headers already sent by (output started at /var/www/html/elmsln_community/api.elmsln.org/includes/common.inc:2791) in drupal_send_headers() (line 1499 of /var/www/html/elmsln_community/api.elmsln.org/includes/bootstrap.inc).
  • Error: Call to undefined function apc_delete() in DrupalAPCCache->clear() (line 289 of /var/www/html/elmsln_community/api.elmsln.org/sites/all/modules/apc/drupal_apc_cache.inc).
The website encountered an unexpected error. Please try again later.