Re[8]: [PHP] STrange Problem
| From: | Richard Davey | Date: | Fri, 12 Mar 2004 19:32:41 +0000 |
| Subject: | Re[8]: [PHP] STrange Problem | ||
| References: | 1 2 3 4 5 6 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-180288@lists.php.net to get a copy of this message | ||
Hello PHP,
Friday, March 12, 2004, 7:23:47 PM, you wrote:
P> It returns:
P> Connected successfully
P> Like I said, I have not problems connecting. Only mysql_select_db will not
P> work.
Fine, what does this return? With "foo" replaced with your database
name.
<?php
$lnk = mysql_connect('localhost', 'mysql_user', 'mysql_password')
or die('Not connected : ' . mysql_error());
// make foo the current db
mysql_select_db('foo', $lnk) or die ('Can\'t use foo : ' . mysql_error());
?>
--
Best regards,
Richard Davey
http://www.phpcommunity.org/wiki/296.html