Re: Using PHP with MySQL - Can I supress MySQL errors?

From: Date: Tue, 23 Jul 2002 16:24:53 +0000
Subject: Re: Using PHP with MySQL - Can I supress MySQL errors?
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-109089@lists.php.net to get a copy of this message
You can suppress the error messages of ANY function by placing an @ in front of the function call: @mysql_connect('blah') $result = @mysql_query($sql); etc etc Justin French on 24/07/02 2:08 AM, DonPro (donpro@lclcan.com) wrote: > Hi, > > I'm using PHP to connect and perform queries with a MySQL database. I've > noticed that it there is an error performing certain > commands like 'mysql_connect()', I'll get a warning message in the browser. > > I'd like to suppress these messages as I am storing the error, mysql_error(), > in an array. So if there is an error, I would simply > display the contents of the array in a nice format. > > Is this possible? > > Thanks, > Don > >

« previous php.general (#109089) next »