Function not working

From: Date: Tue, 31 May 2005 00:40:44 +0000
Subject: Function not working
Groups: php.soap 
Request: Send a blank email to php-soap+get-1923@lists.php.net to get a copy of this message
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

« previous php.soap (#1923) next »