Hi,
We are running a now quite outdated PHP installation (4.3.0) on W2K with MSSql.
The PHP is working fine and I can connect to the sql server without any problems.
However, I can only successfully run queries if I use the database name in the query.
Eg. SELECT * FROM person ..... fails with this message:
Warning: mssql_query() [function.mssql-query]: message: Invalid object name 'person'. (severity 16)
BUT .... if the query is SELECT * FROM database_name.person ..... it's works fine
I am using mssql_select_db('database_name') immediately after I connect, but it doesn't seem to do anything.
-----------------------------
$conn = mssql_pconnect($sqlserver , $sqluser , $sqlpass);
mssql_select_db($database);
$result = mssql_query("SELECT * FROM person", $conn);
------------------------------
Any ideas?
Thanks
Jon.