Supressing error messages from MySQL
| From: | Clint Gilders | Date: | Tue, 26 Sep 2000 00:52:57 +0000 |
| Subject: | Supressing error messages from MySQL | ||
| Groups: | php.db | ||
| Request: | Send a blank email to php-db+get-3069@lists.php.net to get a copy of this message | ||
Hi
I am working on a Mysql/PHP3 based banner rotation program and would
like to know how to suppress the error messages form MySQL.
If the program is unable to connect to the database I have it loading a
default image. This way I will know if there is problem. But, I would
also like to get rid of the ugly error message that is spit out on the
screen so the rest of the world doesn't know there is problem.
How to get rid of:
Warning; MySQL Connection Failed: Can't connect to local MySQL server
through socket '/tmp/mysql.sock' (2) in /path/to/php/script.php3 on line
16
or even send it to a file for later reference?
Thanks
Clint
--
Clint Gilders
Servermaster Onlinehobbyist Inc.
servermaster@kingsnake.com