ernerojd / php-wsdl-creator

Automatically exported from code.google.com/p/php-wsdl-creator
GNU General Public License v3.0
0 stars 0 forks source link

Multidimensional return of a mysql result #2

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
1. Get data from mysql within the service:
/**
     * Gets the files for the specific version
     * 
     * @param string $v Current version of the application
     * @return stringArray array of files
     */
    public function GetFilesByVersion($v)
    {
        $version = ltrim(str_replace(".","",$v));
        $query = "SELECT v.Version, d.Name, d.Description, f.Extension FROM Versions v INNER JOIN Downloads d ON d.FK_Version_ID = v.ID INNER JOIN Filetypes f ON d.FK_FileType_ID = f.ID WHERE replace(v.Version,'.','') >= '".$version."'";
        $result = mysql_query($query);

        while ($row = mysql_fetch_assoc($result))
        {
            $rows[] = $row;
        };

        return ($rows); 
    }

What is the expected output? What do you see instead?
In visual studio i got 3 items in the array with the value "Array", not the 
entire data

What version of the product are you using? On what operating system?
php-wsdl 2.3, visual studio 2010 and .net 4 (c#)

Please provide any additional information below.
Is it possible to return a multidimensional array (like a result in mysql with 
more than one row) to c#?
If it's possible, please provide some stuff.
I've already tried it with the complextype:

/**
 * @pw_complex RowArray An array of Row
*/

/**
* This is needed to get multidimensional data from the database
*
* @pw_element stringArray A string with a value
* @pw_complex Row Defines an 2 dimensional array
*/
class Row{
    public $array=array();
}

and returning it like @return RowArray. But this doesn't work.
Thanks in advance for your help. 

(Zur Not können wir auch deutsch reden ;))

Original issue reported on code.google.com by insanity...@gmail.com on 28 Dec 2011 at 1:40

GoogleCodeExporter commented 8 years ago
Sorry wegen der langen Zeitverzögerung für meine Antwort - ich habe leider 
die Issue-Benachrichtigungen per Email nicht bekommen und bearbeite gerade alle 
offenen Issues. Ich werde mir das genauer ansehen und die Hilfe und Demos um 
ein Beispiel dazu erweitern.

(I'll review the issue and add examples to the help and demo files for working 
with multidimensional arrays)

Original comment by schickwa...@googlemail.com on 22 Aug 2012 at 9:22

GoogleCodeExporter commented 8 years ago
okay, super! Ich denke das wird einigen anderen auch helfen.

(I suppose that will help others too)

Original comment by insanity...@gmail.com on 13 Feb 2013 at 3:06

GoogleCodeExporter commented 8 years ago
Hallo, gibt es bzgl. dem multidimensionalen Array als Rückgabewert etwas neues?

(Hello, is there any update of a multidimensional array as return-value?)

Original comment by RBrixel on 19 Mar 2013 at 10:23

GoogleCodeExporter commented 8 years ago
Hey jemand von euch die Lösung zu finden?

Original comment by manuk...@gmail.com on 23 May 2014 at 6:33

GoogleCodeExporter commented 8 years ago
Hey any of you find the solution?

Original comment by manuk...@gmail.com on 23 May 2014 at 6:34