Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Multidimensional return of a mysql result #2

Open
GoogleCodeExporter opened this issue Mar 11, 2016 · 5 comments
Open

Multidimensional return of a mysql result #2

GoogleCodeExporter opened this issue Mar 11, 2016 · 5 comments

Comments

@GoogleCodeExporter
Copy link

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
Copy link
Author

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

  • Changed state: Started
  • Added labels: Type-Other
  • Removed labels: Type-Defect

@GoogleCodeExporter
Copy link
Author

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
Copy link
Author

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
Copy link
Author

Hey jemand von euch die Lösung zu finden?

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

@GoogleCodeExporter
Copy link
Author

Hey any of you find the solution?

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant