Documentation

calculateQueryLimits

array public static
\Bitrix\Main\DB\Paginator::calculateQueryLimits(
 integer $numberOfRecords,
 integer $pageNumber,
 integer $numberOfRecordsPerPage,
 boolean $backward
);

This static method returns two element array with offset and limit based on paging parameters.

Parameters

ParameterDescriptionVersion
$numberOfRecordsTotal number of records returned by SQL query.
$pageNumberPage to be displayed.
$numberOfRecordsPerPagePage size.
$backwardUse backward paging.

Examples



© «Bitrix24», 2001-2024