Re: Re: error-catching

From: Date: Thu, 09 May 2002 16:25:06 +0000
Subject: Re: Re: error-catching
References: 1 2 3 4 5  Groups: php.general 
Request: Send a blank email to php-general+get-96834@lists.php.net to get a copy of this message
That's what the @ operator is there for - there's nothing wrong with using it, though it's considered bad form to use it without implementing your own error checking as the code would be near impossible to debug. Danny. ----- Original Message ----- From: "Gert Mellak" <gert@mellak.com> To: <php-general@lists.php.net> Sent: Thursday, May 09, 2002 5:18 PM Subject: Re: [PHP] Re: error-catching > > $db_connect = mysql_connect($db_server, $db_user, $db_pass) or > die('Couldn't > > connect to database'); > > > > $db_open = mysql_select_db($db_name, $db_connect) or die('Couldn't select > > database'); > > well, I tried this out and if the mysql-server is down, I get the > "Warning: Unable to connect to mysql-server"-stuff. > > The only way I've found was to connect by @mysql_connect - but that's not > the fine style, yeah? > > Gert. > > > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php >

« previous php.general (#96834) next »