I want to hide all mysql error messages without using mysql_error()
.
Are there any solutions?
Asked
Active
Viewed 3.1k times
3 Answers
9
Put @
in front of your mysql_query
call (@mysql_query('some query');
) to suppress the error messages.

Marek Karbarz
- 28,956
- 6
- 53
- 73
-
5In this way you get rid of your error messages, but it won't solve problem with your query. Suppressing error messages isn't the right way to do it. You should fix your queries. – Mikk Mar 18 '10 at 17:50
0
Yes you can add @
before all mysql queries.
example:
$result = @mysql_db_query ("database","SELECT * FROM agents WHERE ID = '$id'");

Jason Roman
- 8,146
- 10
- 35
- 40

khaldonno
- 449
- 4
- 2