Collections functions
General functions
Node functions
Render functions
Theme permission functions
User functions
Resource functions



Utility function to obtain the total found rows while paginating the results.

IMPORTANT: the input query MUST have a deterministic order so it can help with performance and not have an undefined behaviour

configuration option (e.g $default_perpage, $default_perpage_list).

- total: int - count of total found records (before paging)
- data: array - paged result set


$query PreparedStatementQuery SQL query
$rows null|int Specifies the maximum number of rows to return. Usually set by a global
$offset null|int Specifies the offset of the first row to return. Use NULL to not offset.
$cachecount bool false Use previously cached count if available?
$countquery null|PreparedStatementQuery null Optional separate query to obtain count, usually without ORDER BY


array Returns a:

This article was last updated 23rd July 2024 21:05 Europe/London time based on the source file dated 23rd July 2024 15:30 Europe/London time.