The link error can really only mean it can't login to your database as far as i know. You might need to turn on PHP errors so you can see the connection error. You can add ini_set('display_errors', 'on'); to the top of your PHP page then run it again. My guess is that will show an error saying the mysql_pconnect call has failed.$dname is the connection to your MySQL database. With your original error, it means $dbname is null which means it failed to connect to MySQL for some reason.
-justin

After speaking to the hosting provider it seems the error was the way that the php duplicated reference to the database.
ie.
mysql_select_db($database_DBNAME, $DBNAME);
mysql_query($query_limit_RSNAME, $DBNAME)
to get this to work I had to change the syntax to:
mysql_select_db(DBNAME);
and take out the reference to the DBNAME as follows:
mysql_query($query_limit_RSNAME).
Would this be anything to do with conflicting versions of php?.


