2 Replies Latest reply on Aug 24, 2010 7:11 AM by flexillu10

    How can i access a mysql table without putting the data in a datagrid

    flexillu10 Level 1

      I developed my air app with a datagrid which uses a php service to display all data from a table of strings in MySql.

       

      I now do not need the datagrid, how can i get the data from my database without putting it into a dataGrid? Do i need an array? how do i do this? anyone got any example code?

        • 1. Re: How can i access a mysql table without putting the data in a datagrid
          Balakrishnan V Level 3

          var resultArrayCollection:ArrayCollection=new ArrayCollection()

           

          protected function resultHandler(event:ResultEvent)

          {

               result=event.result as ArrayCollection

          }

           

          You can use the result array collection now inside your program for any further changes / manipulations.

           

          Hope this helps; If you have further doubts, do ask...

           

           

          Balakrishnan V

          • 2. Re: How can i access a mysql table without putting the data in a datagrid
            flexillu10 Level 1

            Balakrishnan V wrote:

             

            var resultArrayCollection:ArrayCollection=new ArrayCollection()

             

            protected function resultHandler(event:ResultEvent)

            {

                 result=event.result as ArrayCollection

            }

             

            You can use the result array collection now inside your program for any further changes / manipulations.

             

            Hope this helps; If you have further doubts, do ask...

             

             

            Balakrishnan V

            Hi, yeah this helps,

             

            however, how would i generate a result handler for a service that has not been called yet? Sorry my knowledge of services is very limited.

             

            This is a php service, get_all service that returns all the rows from a mysql table.

             

            I can see the service box with the service i want to use:

             

            servicebox.png

             


            but how do i pass that to a result handler?