How to hide the error message

I want to hide all mysql error messages without using mysql_error() . Are there any solutions?

+3
source share
3 answers

The first line of code before any function in your PHP script

 error_reporting(0); 
+6
source

Put @ before calling mysql_query ( @mysql_query('some query'); ) to suppress error messages.

+11
source

Yes, you can add @ before all mysql queries.

Example:

$result = @mysql_db_query ("database","SELECT * FROM agents WHERE ID = '$id'");

+2
source

All Articles