PHP 4.0 Bug #6698 Updated: Resource id #1 on $mysql_link
| From: | Bug Database | Date: | Wed, 13 Sep 2000 10:49:44 +0000 |
| Subject: | PHP 4.0 Bug #6698 Updated: Resource id #1 on $mysql_link | ||
| Groups: | php.dev | ||
| Request: | Send a blank email to php-dev+get-33125@lists.php.net to get a copy of this message | ||
ID: 6698
Updated by: sniper
Reported By: domisse@terravirtual.net
Status: Closed
Bug Type: MySQL related
Assigned To:
Comments:
You can check if connection was established like this:
$mysql_link = mysql_connect("195.154.245.142","root","");
if(!$mysql_link) {
die("ERROR: No connection!");
}
Documentation says:
Returns a positive MySQL link identifier on success, or an error message on failure.
--Jani
Previous Comments:
---------------------------------------------------------------------------
[2000-09-12 21:55:49] domisse@terravirtual.net
I'm trying to check if my MySQL connection work with :
$mysql_link = mysql_connect("195.154.245.142","root","");
print "$mysql_linkn";
Documentation says that $mysql_link should be a int but
i get an "Resource id #1" whatever the connexion is
made or not.
I need to test if i could access MYSql successfuly.
I've seen the bug closed in 4.0.1 but I have still
the problem with 4.0.2
Thanks
Laurent
---------------------------------------------------------------------------
Full Bug description available at: http://bugs.php.net/?id=6698