mysql_xdevapi\CollectionModify
PHP Manual

CollectionModify::limit

(No version information available, might only be in Git)

CollectionModify::limitLimit number of modified documents

说明

public mysql_xdevapi\CollectionModify mysql_xdevapi\CollectionModify::limit ( integer $rows )

Limit the number of documents modified by this operation.

参数

rows

The maximum number of modified documents.

返回值

A CollectionModify object.

范例

Example #1 mysql_xdevapi\CollectionModify::limit() example

<?php

$res 
$coll->modify(2)->sort('name desc''age asc')->limit(4)->set('Married''NO')->execute();

?>

mysql_xdevapi\CollectionModify
PHP Manual