Voting

: max(six, one)?
(Example: nine)

The Note You're Voting On

jab_creations at yahoo dot com
23 days ago
For those who are frustrated that PHP is now handling your SQL errors it's actually buried here:

https://www.php.net/mysqli_report

Specifically:
https://www.php.net/manual/en/mysqli.constants.php#constant.mysqli-report-off

Which is ironic. Yes, there is some validity to trying to centralize all error reporting regardless of the source of the errors but if you're like me with ~1,500 instances of SQL queries it's not at the top of your to-do list (especially with how much technical debt many people have on top of client demands).

Simply add this along with your other error reporting settings:

<?php
//Prevents PHP from handling SQL errors:
mysqli_report(MYSQLI_REPORT_OFF);
?>

If you're starting a new project or have way too much time on your hands then I'd agree you're in a better position to try to merge all of the error reporting. Choose wisely and good luck!

<< Back to user notes page

To Top