mysqli_stmt::__construct

(PHP 5, PHP 7)

mysqli_stmt::__construct新しい mysqli_stmt オブジェクトを構築する

説明

public mysqli_stmt::__construct(mysqli $mysql, string|null $query = null)

このメソッドは、新しい mysqli_stmt オブジェクトを構築します。

パラメータ

link

有効な mysqli オブジェクト

query

クエリを文字列で渡します。 この引数が null の場合、コンストラクタは mysqli_stmt_init() と同じふるまいをします。 null でない場合、 mysqli_prepare() と同じふるまいをします。

変更履歴

バージョン 説明
8.0.0 query は、nullable になりました。

参考

  • mysqli_prepare() - 実行するための SQL文 を準備する
  • mysqli_stmt_init() - ステートメントを初期化し、mysqli_stmt_prepare で使用するオブジェクトを返す

add a note add a note

User Contributed Notes

There are no user contributed notes for this page.
To Top