« mysql_xdevapi\TableUpdate
TableUpdate::__construct »

TableUpdate::bind

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

TableUpdate::bind — update のクエリパラメータをバインドする

説明

public function mysql_xdevapi\TableUpdate::bind(array $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();

?>
関連キーワード:
TableUpdate   mysql   xdevapi   バインド   bind   update   クエリ   placeholder   values   プレースホルダー   session   schema   table   construct   information   available   特定   getSession   mysqlx   user   password   localhost   getSchema   addressbook   getTable
関連する関数・ページ:
mysql-xdevapi-tableupdate.construct   mysql-xdevapi-tableupdate.execute   class.mysql-xdevapi-tableupdate   mysql-xdevapi-tableupdate.set   mysql-xdevapi-tableupdate.where   mysql-xdevapi-tableupdate.limit