note 20316 added to function.mysql-select-db
| From: | yselemenakis at tereus dot com | Date: | Fri, 29 Mar 2002 17:20:17 +0000 |
| Subject: | note 20316 added to function.mysql-select-db | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-28389@lists.php.net to get a copy of this message | ||
<?php
$var1 = mysql_connect("acc-2", "Administrator", "")
or die("Could not connect\n");
echo $var1."\n";
print ("Connected successfully\n");
$var2 = mysql_select_db("guestbook",$var1) //returns false
or die("Could not select database\n");
echo $var2."\n";
mysql_close($var1);
?>
This code just connects with MySQL and then selects the database "guestbook" that I have
created, but unsuccessfully. Once I installed MySQL, there were another two databases, namely
"mysql" and "test" which only "test" database can be selected.
"test" database is empty; if database contains a table my PHP script cannot select it,
returning false from the mysql_select_db. Please help me...
--
http://www.php.net/manual/en/function.mysql-select-db.php
http://master.php.net/manage/user-notes.php?action=edit+20316
http://master.php.net/manage/user-notes.php?action=delete+20316
http://master.php.net/manage/user-notes.php?action=reject+20316