Unknown database error

admin

Administrator
Staff member
Hello,

This is a long-shot - but I have been having errors (error message):

Unknown database 'mydb'

(where mydb is the name of my mysql db)

I am currently using prohosting.
These tend to happen ad hoc (ie there is no pattern).

My db connection script is:

<?php
function fatal_error($message)
{
$err="Error: ".mysql_errno()." ".mysql_error();
echo $err;
)
//create connection to database
$connection = mysql_pconnect("localhost","mydb","mypassword")
or die(fatal_error("Couldn't connect to server"));


// select database
$db = mysql_select_db("mydb", $connection)
or die(fatal_error("Couldn't select database."));
?>

I don't think there is anything wrong with the script since it has remained unchanged for over 6 months.

I am using php4pl1.

Many Thanks for any help
Dipen
 
Back
Top