Is there any way to prevent MySql errors (if happened) from appearing to the client, and just log them somewhere ?
Note 1: Am not using any frameworks, just native PHP with PDO extinsion and MySql.
Note 2: This code will stop PHP errors, not MySql.
ini_set('display_errors', 0);
ini_set("display_startup_errors", 0);
error_reporting(0);
Example:
disabling errors like
SQLSTATE[HY000] [1045] Access denied for user ..