It may be having a problem because you are not specifying which connection 
to use.

perhaps try something like this:

if(!$db = @mysql_connect("$dbhost", "$dbuser", "$dbpasswd"))
     die("An Error Occured. Unable to connect to the database.");
if(!@mysql_select_db("$dbname",$db))
     die("An Error Occured. Unable to find the database $dbname on the 
MySQL server.");

Hope that helps.

Jeff

At 09:24 PM 2/9/2002 +0100, Nick Wilson wrote:
>-----BEGIN PGP SIGNED MESSAGE-----
>Hash: SHA1
>
>Hi all,
>I just can't see what could possibly be wrong with my php here:
>
>         $sel_db=mysql_select_db("mydb") or die
>         ("could not get the bugger");
>         exit;
>
>I can 'USE mydb' just fine from the command line so what's the problem?
>     (returns the die statement)
>
>Much thanks..
>- --
>
>Nick Wilson
>
>Tel:    +45 3325 0688
>Fax:    +45 3325 0677
>Web:    www.explodingnet.com
>
>
>
>-----BEGIN PGP SIGNATURE-----
>Version: GnuPG v1.0.6 (GNU/Linux)
>
>iD8DBQE8ZYWRHpvrrTa6L5oRArthAJ9Vew5DIKSR7qzc4M2abhxJfpz5TwCfRmZJ
>ZBn2oUXT4UgsH1hM/UyyNGs=
>=ajT+
>-----END PGP SIGNATURE-----
>
>--
>PHP General Mailing List (http://www.php.net/)
>To unsubscribe, visit: http://www.php.net/unsub.php



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to