mysqli_report

(PHP 5, PHP 7, PHP 8)

mysqli_reportmysqli_driver->report_mode のエイリアス

説明

この関数は次の関数のエイリアスです。 mysqli_driver->report_mode

add a note add a note

User Contributed Notes 3 notes

up
1
grepmaster
15 years ago
Hint: If you use

mysqli_report(MYSQLI_REPORT_ALL ^ MYSQLI_REPORT_STRICT)

normal errors are generated instead of exceptions.
up
0
sethVoid@thevoid
2 years ago
If you use your own DBException handling for example

<?php
if (!@real_connect(HOST, USERNAME, PASSWORD, NAME, PORT))
{
    throw new
DBException(connect_errno);
}
?>

Then turn off errors like this for php 8 >

<?php
    mysqli_report
(MYSQLI_REPORT_OFF);
?>
up
-2
Polarina
16 years ago
It should be noted that all reports made by this function, are sent through an exception named 'mysqli_sql_exception' instead of a normal PHP warning.
To Top