2024 年 PHP 日本研討會

TableUpdate::set

(沒有版本資訊,可能只在 Git 中)

TableUpdate::set新增要更新的欄位

說明

public mysql_xdevapi\TableUpdate::set(字串 $table_field, 字串 $expression_or_literal): mysql_xdevapi\TableUpdate

更新表格中記錄的欄位值。

參數

table_field

要更新的欄位名稱。

expression_or_literal

指定欄位要設定的值。

回傳值

TableUpdate 物件。

範例

範例 #1 mysql_xdevapi\TableUpdate::set() 範例

<?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();

?>
新增註解

使用者貢獻的註解

此頁面沒有使用者貢獻的註解。
To Top