Re: SOAP and mssql

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



hi,

this is the code i have tried for connecting the database..but it shows
nothing
hope you can help me out of this issue
thank you

mssql_connect ("server","user","password");
mssql_select_db ("databasename");

$query = "SELECT Roadname from Road WHERE Road_name = 'boulevard'";
$result = mssql_query($query);

$course = mssql_fetch_assoc($result);
$courses = array('address' => $course["Roadname"]);


if (isset($this->courses[$symbol]))
  {
  return $this->courses[$symbol];
  }
  else
  {
  throw new SoapFault("Server","Unknown User Name '$symbol'.");
  }
  }

regards,
kencana

Claus Jørgensen wrote:
> 
> Hey
> 
> Yes, you just make your getQuote() method return a array of data, that is
> fetched from your MSSQL server. And you should be able to use the same
> WSDL
> as you used for the current method (an array is an array/complex-type :-]
> )
> 
> -- 
> Sincerely
>   Claus Jørgensen
> 
> 2006/11/9, Kencana <bluesky_dyx@hotmail.com>:
>>
>>
>> hi all,
>>
>> I am a new user of php & SOAP..I got one question about using SOAP.
>> I have try to run SOAP and it runs successfully without any problem
>>
>> the following is the code of the SOAP server:
>> class QuoteService {
>> private $quotes = array('V3' => 'password',
>>                          'kencana' =>'kencana',
>>                          'wisna' =>'wisna');
>>
>> private $status = array('V3' => 'Admin',
>>                          'kencana' =>'user',
>>                          'wisna' =>'user');
>>
>>
>> function getQuote($symbol) {
>>   if (isset($this->quotes[$symbol]))
>>   {
>>   return $this->quotes[$symbol];
>>   }
>>   else
>>   {
>>   throw new SoapFault("Server","Unknown User Name '$symbol'.");
>>   }
>>   }
>>
>> function getStatus($symbol) {
>>   if (isset($this->status[$symbol]))
>>   {
>>   return $this->status[$symbol];
>>   }
>>   else
>>   {
>>   throw new SoapFault("Server","Unknown User Name '$symbol'.");
>>   }
>>   }
>>
>> as you can see, the code retrieved the data from the listed array, my
>> question is, is that possible to retrieve
>> the data from mssql server?if yes, can i know how?
>>
>> I hope somebody can help me out, and pardon me as i am a new user of
>> this.therefore please bear with me.
>>
>> Regards,
>> Kencana
>> --
>> View this message in context:
>> http://www.nabble.com/SOAP-and-mssql-tf2600206.html#a7253801
>> Sent from the Php - Soap mailing list archive at Nabble.com.
>>
>> --
>> PHP Soap Mailing List (http://www.php.net/)
>> To unsubscribe, visit: http://www.php.net/unsub.php
>>
>>
> 
> 

-- 
View this message in context: http://www.nabble.com/SOAP-and-mssql-tf2600206.html#a7270269
Sent from the Php - Soap mailing list archive at Nabble.com.

-- 
PHP Soap Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[Index of Archives]     [PHP Home]     [PHP Users]     [Kernel Newbies]     [PHP Database]     [Yosemite]

  Powered by Linux