1 Reply Latest reply on Dec 15, 2010 2:52 AM by flex2008

    listing mysql database tables in DataGrid

    MatPuzzler

      Hi everyone,

       

      I'm trying to Display all availible Tables of a Database in a DataGrid.

       

      Rather than listing the data in the column, it lists them in the first row of the column sperated by comma.
      Please, can someone tell me what i'm doing wrong there?

       

      Thanks in Advance.

      Mat

       

       

      Code so far:

       

       

          <mx:DataGrid id="dgTableListRequest" x="75" y="60" dataProvider="{tableListRequest.lastResult.tablelist}" height="145">

              <mx:columns>

                  <mx:DataGridColumn headerText="Tables" dataField="table"/>

              </mx:columns>

          </mx:DataGrid>

       

       

       

      PHP:

       

      $Query = "SHOW TABLES FROM vokabeln";
      $Result = mysql_query( $Query );

       

      $Return="<tablelist>";
      while ($row = mysql_fetch_row($Result)) {
        $Return.="<table>".$row[0]."</table>";
      }
      $Return.="</tablelist>";

       

      print ($Return);