(無版本資訊,可能僅存在於 Git 中)
TableUpdate::bind — 綁定更新查詢參數
將值綁定到特定佔位符。
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();
?>