Re: MySQL query not working!

From: Date: Wed, 31 Mar 2010 13:48:58 +0000
Subject: Re: MySQL query not working!
References: 1 2 3 4 5  Groups: php.general 
Request: Send a blank email to php-general+get-303676@lists.php.net to get a copy of this message
On Wed, Mar 31, 2010 at 9:08 AM, Andrew Ballard <aballard@gmail.com> wrote: > Nope. All it does is suppress the error message. Just try it: > > <?php > > @mysql_connect('localhost', 'baduser', 'badpassword') or > die('Could > not connect'); > > ?> > > Output: > Could not connect > <?php > > @mysql_connect('localhost', 'baduser', 'badpassword') or > die('Could > not connect'); > > ?> > > Output: > <br /> > <b>Warning</b>:  mysql_connect() [<a > href='function.mysql-connect'>function.mysql-connect</a>]: Can't > connect to MySQL server on 'localhost' (10061) in <b>PHPDocument1</b> > on line <b>3</b><br /> > Could not connect > > Andrew > OK, for the sake of the archives, I wish there was an "EDIT" feature to this list. Copy/paste will get you every time; or, "Insanity: doing the same thing over and over again and expecting different results." :-) At any rate, the point I was TRYING to make is correct, even if the example wasn't quite right. Andrew

« previous php.general (#303676) next »