mysqli_stmt::__construct

(PHP 5, PHP 7, PHP 8)

mysqli_stmt::__constructConstruye un nuevo objeto mysqli_stmt

Descripción

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

Este método construye un nuevo objeto mysqli_stmt.

Parámetros

link

Un objeto mysqli válido.

query

La consulta, en forma de string. Si este argumento es null, entonces el constructor se comportará como la función mysqli_stmt_init(); de lo contrario, se comportará como la función mysqli_prepare().

Errores/Excepciones

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.

Historial de cambios

Versión Descripción
8.0.0 query ahora es nullable.

Ver también

add a note

User Contributed Notes

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