Re: How to prevent error on connect failure ...

From: Date: Wed, 20 Sep 2000 08:27:28 +0000
Subject: Re: How to prevent error on connect failure ...
References: 1  Groups: php.db 
Request: Send a blank email to php-db+get-2985@lists.php.net to get a copy of this message
Andris, If you add a @ on to the front the error message will not appear. eg $con = @mysqlpconnect(...) Then you can decide what to do. Alternatily you can alter error_reporting(). hth, David. ----- Original Message ----- From: Andris Jancevskis <a.jancevskis@konts.lv> To: PHP-DB LIST <php-db@lists.php.net> Sent: Wednesday, September 20, 2000 7:31 AM Subject: [PHP-DB] How to prevent error on connect failure ... > Hi, > > I want to prevent error message on mysql_pconnect() > if connection is not established. > One way is to use "or die", but I need to redirect to error page. > I don't know better way than "or die". > Did You know how redirect or best way to > catch error from displaying in page? > > Linux, PHP 4.0, mySQL. > > TIA, > Andris > ---------------------------------------------------------------------------- ---- > -- > PHP Database Mailing List (http://www.php.net/) > To unsubscribe, e-mail: php-db-unsubscribe@lists.php.net > For additional commands, e-mail: php-db-help@lists.php.net > To contact the list administrators, e-mail: php-list-admin@lists.php.net

« previous php.db (#2985) next »