note 20316 rejected from function.mysql-select-db by alindeman

From: Date: Fri, 29 Mar 2002 17:35:00 +0000
Subject: note 20316 rejected from function.mysql-select-db by alindeman
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-28390@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...

« previous php.notes (#28390) next »