Agaith
12-03-02, 03:49
| I try to connect to 2 databases using the following syntax: $hostname = "192.168.100.***"; $username = "****"; $password = "****"; MSSQL_CONNECT($hostname,$username,$password) or DIE("DATABASE FAILED TO RESPOND."); //$dbname = "DB1"; //mssql_select_db($dbName, $db2) or DIE("Table unavailable"); $query = "select t1.field, t2.field FROM DB1.dbo1.table t1, DB2.dbo.field t2"; $result = MSSQL_QUERY($query); echo $number = MSSQL_NUM_ROWS($result); If i use the commented lines i get the connection to this db but i can't reach the other db but if i don't use them i get a error as follows: MS SQL message: Invalid object name 'DB1.****.field'. (severity 16) in c:\program\apache group\apache\htdocs\lab\2sql.php on line 25 |