开发者

How to hide an error message

I want to hide all mysql error messages without using mysql_e开发者_JS百科rror(). Are there any solutions?


First line of code before any function in your php script

error_reporting(0);


Put @ in front of your mysql_query call (@mysql_query('some query');) to suppress the error messages.


Yes you can add @ before all mysql queries.

example:

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

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜