PHP Conference Japan 2024

TableUpdate::bind

(無版本資訊,可能僅存在於 Git 中)

TableUpdate::bind綁定更新查詢參數

說明

public mysql_xdevapi\TableUpdate::bind(陣列 $placeholder_values): mysql_xdevapi\TableUpdate

將值綁定到特定佔位符。

參數

placeholder_values

佔位符的名稱和要綁定的值,定義為 JSON 陣列。

回傳值

一個 TableUpdate 物件。

範例

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

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

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

$table->update()
->
set('status', 'admin')
->
where('name = :name and age > :age')
->
bind(['name' => 'Bernie', 'age' => 2000])
->
execute();

?>
新增註釋

使用者提供的註釋

此頁面沒有使用者提供的註釋。
To Top