Oh, I see now! When you gave the command mysql ... my_database, at the moment of the MySQL shell, you have the database "my_database" already selected. So all of your queries works fine because you are in the right database. In the PHP or other environment, you need to select the database after connecting and before query.So follow the order: 1. connection with $conn = @mysql_connect($dh,$du,$dp); 2. selecting the database with mysql_select_db("my_database",$conn); 3. performing query $result=db_query($sql);
If you get an error in this step, it's not a PHP/Web matter. If all works fine, you can use : mysql_select_db($db,$conn); in place of mysql_select_db("my_database",$conn); If you get an error in the last step, the value of $db is wrong, so check the webpage which sends the value to $db. Iulian -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe: http://lists.mysql.com/[EMAIL PROTECTED]