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
Parameter | Description | Version |
---|---|---|
$sql | SQL query. | |
$connection | Database connection for query execution.. | |
$numberOfRecords | Total number of records returned by SQL query.. | |
$pageNumber | Page to be displayed. | |
$numberOfRecordsPerPage | Page size. | |
$backward | Use backward paging. |
Exceptions
Examples
© «Bitrix24», 2001-2024
Up