PHP 8.3.4 Released!

mysqli_stmt::__construct

(PHP 5, PHP 7, PHP 8)

mysqli_stmt::__constructErzeugt ein neues mysqli_stmt-Objekt

Beschreibung

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

Diese Methode erzeugt ein neues mysqli_stmt-Objekt.

Parameter-Liste

link

Ein gültiges mysqli-Objekt.

query

Die Abfrage als Zeichenkette. Wenn der Parameter null ist, dann verhält sich der Konstruktor genau wie mysqli_stmt_init(), andernfalls verhält er sich wie bei mysqli_prepare().

Fehler/Exceptions

If mysqli error reporting is enabled (MYSQLI_REPORT_ERROR) and the requested operation fails, a warning is generated. If, in addition, the mode is set to MYSQLI_REPORT_STRICT, a mysqli_sql_exception is thrown instead.

Changelog

Version Beschreibung
8.0.0 query ist nun ein Nullable-Typ.

Siehe auch

  • mysqli_prepare() - Bereitet eine SQL-Anweisung zur Ausführung vor
  • mysqli_stmt_init() - Initialisiert eine Anweisung und liefert ein Objekt für die Verwendung mit mysqli_stmt_prepare

add a note

User Contributed Notes

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