mysql_xdevapi\TableUpdate
PHP Manual

TableUpdate::limit

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

TableUpdate::limitLimit update row count

说明

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

Set the maximum number of records or documents update.

参数

rows

The maximum number of records or documents to update.

返回值

A TableUpdate object.

范例

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

<?php

$upd 
$table->update()->orderBy('age desc')->set('age'1)->set('name''Toddler');
$res $upd->where('age > :param1 and age < :param2')->bind(['param1' => 500'param2' => 1901])->limit(2)->execute();

?>

mysql_xdevapi\TableUpdate
PHP Manual