The mysqli_sql_exception class

(PHP 5, PHP 7, PHP 8)

Introdução

The mysqli exception handling class.

Sinopse da classe

final class mysqli_sql_exception extends RuntimeException {
/* Propriedades */
protected string $sqlstate = "00000";
/* Propriedades herdadas */
protected string $message;
protected int $code;
protected string $file;
protected int $line;
/* Métodos */
public getSqlState(): string
/* Métodos herdados */
final public Exception::getMessage(): string
final public Exception::getCode(): mixed
final public Exception::getFile(): string
final public Exception::getLine(): string
final public Exception::getTrace(): array
final public Exception::getTraceAsString(): string
public Exception::__toString(): string
final private Exception::__clone(): string
}

Propriedades

sqlstate

The sql state with the error.

Índice

add a note add a note

User Contributed Notes 1 note

up
9
fibrizo dot raziel at gmail dot com
6 years ago
<?php  mysqli_report(MYSQLI_REPORT_STRICT) ?>
was not enough for me to enable exception throwing. I had to write this:
<?php mysqli_report(MYSQLI_REPORT_ERROR | MYSQLI_REPORT_STRICT); ?>
To Top