Newbie question ^_^

wxdqz

New Member
Just a quick question, why does this work:

mysql_select_db("databasename", $connection);

but this not?:

$db = "databasename";
mysql_select_db($db, $connection);

Whenever I try to use the $db variable I get a "No Database Selected" mysql_error.
 
Back
Top