TableUpdate::limit

(사용 가능한 버전 정보가 없으며 Git에만 있을 수 있음)

TableUpdate::limit — 업데이트 행 수 제한


설명

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

레코드 또는 문서 업데이트의 최대 수를 설정합니다.


매개변수

rows
업데이트할 최대 레코드 또는 문서 수입니다.

반환 값

TableUpdate 개체입니다.


Examples

예제 #1 mysql_xdevapi\TableUpdate::limit() 예제

                  
<?php
$session = mysql_xdevapi\getSession("mysqlx://user:password@localhost");

$schema = $session->getSchema("addressbook");
$table  = $schema->getTable("names");

$res = $table->update()
  ->set('level', 3)
  ->where('age > 15 and age < 22')
  ->limit(4)
  ->orderby(['age asc','name desc'])
  ->execute();

?>