|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
[2000-09-12 21:55 UTC] domisse at terravirtual dot net
I'm trying to check if my MySQL connection work with :
$mysql_link = mysql_connect("195.154.245.142","root","");
print "$mysql_link\n";
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
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
|
|||||||||||||||||||||||||||
Copyright © 2001-2026 The PHP GroupAll rights reserved. |
Last updated: Wed Oct 14 00:00:02 2026 UTC |
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