Collections functions
General 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 8th December 2023 01:35 Europe/London time based on the source file dated 29th September 2023 13:20 Europe/London time.