[#1] ▲3▼ bacco [64%] (2017-10-29 19:12:52)
Regarding Anthony's comment: Since 5.2.15 the report mode is per request, not per process anymore. http://php.net/manual/en/mysqli-driver.report-mode.php#refsect1-mysqli-driver.report-mode-changelog
[#2] ▲0▼ grepmaster [50%] (2009-03-22 17:51:00)
Hint: If you use mysqli_report(MYSQLI_REPORT_ALL ^ MYSQLI_REPORT_STRICT) normal errors are generated instead of exceptions.
[#3] ▲1▼ polarina [60%] (2007-11-10 15:08:28)
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.
[#4] ▲1▼ firstname.lastname@example.org [52%] (2005-11-05 19:23:04)
Be very careful using this function - it's a per-process setting.
If your server is set up to reuse a single PHP process for multiple requests, that means the last setting of this function in any script will affect all other scripts using mysqli.
To be safe always call
<?php mysqli_report(MYSQLI_REPORT_OFF) ?>
at the end of a script. The CGI version of PHP is probably safe from this.
(Tested using PHP 5.0.5, Apache 2 SAPI module)