note 14934 deleted from function.mysql-error by jimw

From: Date: Tue, 18 Dec 2001 22:45:06 +0000
Subject: note 14934 deleted from function.mysql-error by jimw
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-23281@lists.php.net to get a copy of this message
I am not for sure if this is true on all systems but I have been successful with something like this: $db = @mysql_connect("$mysqlhost", "$mysqlusername", "$mysqlpassword"); // $db returns blank if the mysql_connect fails and returns something like "Resource id #1" if it returns true. if($db == "") { $error = "MySQL connect failed"; }

« previous php.notes (#23281) next »