How can I transfer data from the database in a variable (or array)?

I made my request according to the example (http://corlan.org/2009/06/12/working-in-flash-builder-4-with-flex-and-php/). Everything works fine. I changed a single function to query the database - add two parameters and get the value from the table to a string format. A test operation shows that everything is ok. If I want to display this value in the text box, I just do drag and drop off service to this element in Design view

(< s:TextArea = "153" x = "435" id = "nameText" text = "{getDataMeanResult.lastResult [0] .name}" width = "296" height = "89" / > ").

Also, it works fine, just a warning and encouraged to use ArrayCollection.getItemAt ().

Now, I want to send the value to a variable or an array, but in both cases, I get an error: TypeError: Error #1010: a term is undefined and has no property..

How can I pass a value to the database in a variable? Thank you.

public var nameTemp:String;

getDataMeanResult.token = authors.getDataMean (arrayOfNumber [0], dir_id);

nameTemp = getDataMeanResult.lastResult [0] .name;

public var nameArray:Array = new Array();

for (var i: uint = o; i < 3; i ++) {}

getDataMeanResult.token = authors.getDataMean (arrayOfNumber [i], dir_id);

NomTableau [i] = getDataMeanResult.lastResult [0] .name;

}

And how do I use syntax highlighting in this forum?

Astraport2012 wrote:

Thank you.

Then this simple question: How can I place a mySQL database data in a variable using the wizards FB4 (connect with PHP)?

If you can show examples please.

I couldn't find examples. Send data to a field text or DataGrid - much, but no variable.

the use of assistants? not sure... it is generally a bad idea to rely on them, because they will never fully what you want anyway. I would recommend learning abit of PHP and manage by yourself, because it allows you to manage everything exactly as you wish.

small example of communicating with a database using PHP + FB4:

mount a database

write you a small script that will access your database, get a value, for example:

";

    while($row = mysql_fetch_array($result))
    {
        if($row['messageID'] == "3")
        {
            print $row['message'];
        }
    }
    print "\n";
?>

This will get the message with ID '3 '.

make an HTTPService in FB4 app to call this Script, as follows:



    
        

        
    

    
        
    
    


and the value must be picked up by the Script and properly stored in a variable

Tags: Flex

Similar Questions

Maybe you are looking for

  • a broken ethernet port can be fixed

    my iMac 27 inches broke the ethernet port, peut it be fixed

  • Every thing opens windows media player

    I don't know what I did. I was down loading a disc photos. Don't know what I clicked but now all my desktop icons are all of the windows media player icon and when I go to system restore and you click on it it opens windows media player also.   help.

  • Pavillion DV6 1030US: another problem of devices

    Hi, my problem with other devices is as follows: Network controller? Acquisition of ICP data and Signal Processing controller? SM Bus controller? Unknown device? Unknown device? I have installed the pilot identifier in the computer but when run it tr

  • any ideas on how to view the files from my external hard drive?

    my external hard drive is only showing my new files and not the rest. I tried already to show hidden folders. Any ideas pls?

  • BlackBerry Z10 a problem in BBM!

    Hey gauys I Z10 > BBM worked smoothly... but just 1 month ago, I couldn't make a call voice and video a messege is apper (connection to video service. BBM if please waite and try again.) So what's the problem! Note that I tried to appeal when connect