Hi,
I have kind-of a problem. I've been working on a web service, which comunicates with a MSSQL server. The problem is that mssql functions don't seem to return a value 'FALSE' when an error occures. this only happens when I use them inside the function of the web service server php file, which creates it's own WSDL file. If i use the code in a simple php page it works ok.
here is some of the code:
Code:
class SQL {
.....
function SELECT($sql, $db) {
if(!($db_link = mssql_connect('MUHA','root','pseto')))
{
...same problem
}
if(!($db_s = mssql_select_db($db, $db_link)))
{
$return[0] = 'failed';
return new SOAP_Value('return','{urn:SQL}ArrayOfStrings',$return);
}
$return[0] = 'OK';
return new SOAP_Value('return','{urn:SQL}ArrayOfStrings',$return);
}
.....
}
....
If I run this code with a database name that does not exist, the page freezes till a timeout occures, or some other strange stuf

The thing is, that if I use a mysql database and mysql_select_db() it works just fine.
Any ideas why this would be so??
Any body had the same problem??
Thank you