MySQL Forums
Forum List  »  PHP

Re: Intermitten error "No Database Selected"
Posted by: Juan Camilo de Argáez
Date: January 02, 2006 02:36PM

Hello,

Im having the same error "No Database Selected". The funny thing is that I can select the database with another application and works perfectly.

Here is the code that fails:

$connection = mysql_connect ($server, $userName, $password) or die ("Could not connect to database, " . mysql_error ());

mysql_select_db ($database, $connection) or die ("Could not select database, " . mysql_error ());

Here is my query (if you want to take a look):

$query = "INSERT INTO myTableName (myColNames) VALUES (myValues);";
mysql_query ($query, $connection);

Please anyone help me!

Options: ReplyQuote


Subject
Written By
Posted
Re: Intermitten error "No Database Selected"
January 02, 2006 02:36PM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.