Function not working

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

 



Im new in SOAP and Im trying to develope a 'dynamic server'. When accessed, the server will use a GET parameter to know wich server it is being requested, then the server will load up functions from a mysql database and eval it to make it avaiable.
	For now, I want make this function to work:

function ListMethods() {
	$host = 'localhost';
	$db = 'soap';
	$user = 'soap';
	$passwd = 'soap';	
	$obDB = mysql_connect($host, $user, $passwd);
	mysql_select_db($db);
$obQuery = mysql_query("SELECT methods.* FROM objects, methods WHERE objects.nome = 'main' AND methods.objeto = objects.objeto;");
	$Result = mysql_fetch_array($obQuery);
	while($Result) {
		$Methods[$Result[1]] = "\n".$Result[2]."\n------\n";
		$Result = mysql_fetch_array($obQuery);
	}
	return $Methods;
}

It should get the name and the code of the 'main' object. I wrote it based in this code:

function ListObjects() {
	$host = 'localhost';
	$db = 'soap';
	$user = 'soap';
	$passwd = 'soap';

	$obDB = mysql_connect($host, $user, $passwd);
	mysql_select_db($db);
	$obQuery = mysql_query('SELECT * FROM objects;');
	$Result[0] = mysql_num_rows($obQuery);
	while($obArray = mysql_fetch_array($obQuery)) {
		$Result[$obArray[0]] = $obArray[1];
	}
	return $Result;
}

But different from ListObjects(), ListMethods() doesn't return anything. But the mysql and stuff is all correct. What may be the problem?

	Note: Once Im new in SOAP, Im using the NUSOAP tool kit.

	Thanks for the attention

		Sid

--
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