* Martin Ramskogler <[EMAIL PROTECTED]> wrote on 26.01.01 12:36:
> is there any way to disable all the MySQL-Warnings that are sent to my
> visitors browsers when the database is down for a moment. I am using the
> database to count the pageviews, and if the connection to the DB is
> impossible, there should not be sent any warning to the visitors browser! Is
> there any way to disable it via PHP or so?

This is not a MySQL issue...

If you prefix your mysql_connect(...) call in PHP with an "@", it will
disable warnings for that function call. Then just check the return value of
the call to make sure you get a proper handle, and if not, just don't try to
do anything else with mysql (or prefix all of them with @, which isn't
probably a very good idea for debugging).


-- 
Tomi Junnila <[EMAIL PROTECTED]>
http://www.badzilla.net/~topeju/
Electronics and Information Technology,
University of Turku, Finland

---------------------------------------------------------------------
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/           (the list archive)

To request this thread, e-mail <[EMAIL PROTECTED]>
To unsubscribe, e-mail <[EMAIL PROTECTED]>
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php

Reply via email to