List:General Discussion« Previous MessageNext Message »
From:Steve Edberg Date:February 22 2001 7:18pm
Subject:Re: Turn off MySql Warning Messages
View as plain text  
Well, this is a database interface (in this case, I assume PHP) 
question rather than a mysql question, but:

Prepend the mysql_connect() with an @ sign to suppress error message reporting:

	@mysql_connect("localhost","root","")
	or die ("Server Currently Unavailable");

See the PHP docs for more info:

	http://www.php.net/manual/en/language.operators.errorcontrol.php

or go to http://www.php.net/search.php, enter the search term 'error'.

	-steve


At 11:28 AM -0600 2/22/01, samsom, debra wrote:
>I would Like to Turn Off the following MySQL Connect Warning message.   Any
>Suggestions???
>
>Warning: MySQL Connection Failed: Can't connect to MySQL server on
>'localhost' (10061) in e:\program files\apache
>group\apache\htdocs\dwg\dwg.php on line 22
>Server Currently Unavailable
>
>This is the code that is returning the above error message.
>
>mysql_connect("localhost","root","")
>     or die ("Server Currently Unavailable");
>
>Debra Samsom
>Bristol Aerospace Ltd.
>(204) 775-8331 3402
>dsamsom@stripped
>

-- 
+--- "They've got a cherry pie there, that'll kill ya" ------------------+
| Steve Edberg                           University of California, Davis |
| sbedberg@stripped                               Computer Consultant |
| http://aesric.ucdavis.edu/                  http://pgfsun.ucdavis.edu/ |
+-------------------------------------- FBI Special Agent Dale Cooper ---+
Thread
Turn off MySql Warning Messagesdebra samsom22 Feb
  • Re: Turn off MySql Warning MessagesScott Baker22 Feb
  • Re: Turn off MySql Warning MessagesSteve Edberg22 Feb
  • Re: Turn off MySql Warning MessagesJorge del Conde22 Feb