Documentation

query

\Bitrix\Main\DB\Result public static
\Bitrix\Main\DB\Paginator::query(
 string $sql,
 \Bitrix\Main\DB\Connection $connection,
 integer $numberOfRecords,
 integer $pageNumber,
 integer $numberOfRecordsPerPage,
 boolean $backward = false
);

This static method makes offset and limit calculations and executes limited query to the database.

Parameters

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

Exceptions

Examples



© «Bitrix24», 2001-2024
Up