I dunno why but I'm getting the mysql_error "No Database selected." However here is my code.
$host = "localhost";
$user = "---";
$pass = "---";
$db = "---";
$connection = mysql_connect($host, $user, $pass);
$database = mysql_select_db($db);
$query = "SELECT * FROM users;";
$result = mysql_query($query);
For obvious reasons, I blocked out the user, pass, and database. Now obviously I'm connecting. I'm not getting any errors from connecting, or from the database selection. Any ideas?
Instead of mysql_select_db, try just running the query "USE your_database_name_here;".
Also, have you made sure that this user has access to that database?
*facepalm* I didn't give database access to the user. Fail. Thanks Blizz!