note 14934 added to function.mysql-error.php

From: Date: Tue, 21 Aug 2001 23:13:32 +0000
Subject: note 14934 added to function.mysql-error.php
Groups: php.notes 
Request: Send a blank email to php-notes+get-16968@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"; } http://www.php.net/manual/en/function.mysql-error.php

« previous php.notes (#16968) next »