php8.5
Home/ Manual/ mysql_xdevapi / collectionmodify/ CollectionModify::skip

CollectionModify::skip

PHP function Edit on GitHub ✎

Skip elements

Description

mysql_xdevapi\CollectionModify::skip(int $position): mysql_xdevapi\CollectionModify

Skips the first N elements that would otherwise be returned by a find operation. If the number of elements skipped is larger than the size of the result set, then the find operation returns an empty set.

Parameters

position

Number of elements to skip.

Return Values

A CollectionModify object to use for further processing.

Examples

mysql_xdevapi\CollectionModify::skip() example

php
<?php

$coll->modify('age > :age')->sort('age desc')->unset(['age'])->bind(['age' => 20])->limit(4)->skip(1)->execute();

?>

Source: reference/mysql_xdevapi/mysql_xdevapi/collectionmodify/skip.xml · from the official PHP manual (php/doc-en)