Listing mysql database tables in DataGrid

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);

This should work:
<mx:DataGrid id="dgTableListRequest" x="75" y="60" dataProvider="{tableListRequest.lastResult.tablelist.table}" height="145">
        <mx:columns>
            <mx:DataGridColumn headerText="Tables" dataField="*"/>
        </mx:columns>
    </mx:DataGrid>

Similar Messages

  • How can I list used database/table size resp user space ? Compression after

    How can I list used + maximum tablespace/database/table size of an Oracle database ?
    How can I list the space used currently by a user resp. his tables+indizes ?
    By the way: If I delete a user or table from an Oracle database installation: are then only the entires deleted
    or is the space released as well ?
    In otherwords: After I deleted a user resp. table is it recommended to do something like a "compress" similarly to Outlook
    or other eMail clients to shrink really the occupied space on hard disc ?

    I hope this helps you
    select df.tablespace_name "Tablespace",
    totalusedspace "Used MB",
    (df.totalspace - tu.totalusedspace) "Free MB",
    df.totalspace "Total MB",
    round(100 * ( (df.totalspace - tu.totalusedspace)/ df.totalspace))
    "Pct. Free"
    from
    (select tablespace_name,
    round(sum(bytes) / 1048576) TotalSpace
    from dba_data_files
    group by tablespace_name) df,
    (select round(sum(bytes)/(1024*1024)) totalusedspace, tablespace_name
    from dba_segments
    group by tablespace_name) tu
    where df.tablespace_name = tu.tablespace_name;

  • F4 Listing from database table dtab

    Hi Experts,
    I want for my F4 Help in a Dynpro just these datas, who have the worth 1 in field f_xy. All other input (even manuell) in the Dynpro, who have not the worth 1 in field f_xy have to be deleted from the dynpro.
    What have I do to?
    Regards,
    Mike

    Hi,
    Try the code given below.
    Regards,
    Wajid Hussain P.
    " In PBO or At selection-screen " event
    if f_xy <> '1'.
    clear: f_other_field1, f_other_field2, f_other_field_N.
    endif.

  • MySQL Database Index Page

    I'm looking for a way to create an index of my MySQL database tables. The basic concept is to have a list of the table names on the left hand side of the page. Clicking on a name will bring up the database contents (repeated to display each record) o nthe right hand side. Any idea or tutorial on how to accomplish this? Thanks!

    Okay, great! I worked with it and modified it a tiny bit to insert a DW table into the results. But when I Insert the php script into each table block, it displays only the first column of data, not the rest.
    <?php
    // connect to database
    $conn = new mysqli('localhost' , 'user' , 'pw' , 'dbase');
    ?>
    <?php
    // get table names from database
    $listTables = $conn->query("show tables") or die($conn->error);
    // get table names from link
    $table_name = $_GET['table_name'];
    if(isset($table_name)) {
    $sql = 'SELECT * FROM '.$table_name.'';
    $getTableList = $conn->query($sql) or die($conn->error);
    ?>
    <!DOCTYPE HTML>
    <html>
    <head>
    <meta charset="UTF-8">
    <title>Bulldog Pain</title>
    <style>
    #pageWrapper {
        width: 750px;
        margin: 0 auto;
    #tableList {
        float: left;
        width: 350px;
    #results {
        float: left;
        width: 400px;
    </style>
    </head>
    <body>
    <div id="pageWrapper">
    <div id="tableList">
    <h2>Table List</h2>
    <?php
    while($printTables = mysqli_fetch_array($listTables)) {
    echo "<a href='list_tables.php?table_name=$printTables[0]'>$printTables[0]</a> <br>";  
    ?>
    </div>
    <!-- end tableList -->
    <div id="results">
    <h2>Results</h2>
    <table width="80%" border="1">
      <tr>
        <th scope="col">Date</th>
        <th scope="col">Patient</th>
        <th scope="col">RX</th>
        <th scope="col">Refills</th>
      </tr>
      <tr>
        <td height="26">
        <?php
    while($row = $getTableList->fetch_assoc()) {
    echo $row['B']."<br>";
    ?>
        </td>
        <td>
            <?php
    while($row = $getTableList->fetch_assoc()) {
    echo $row['A']."<br>";
    ?>
        </td>
        <td>
            <?php
    while($row = $getTableList->fetch_assoc()) {
    echo $row['F']."<br>";
    ?>
        </td>
        <td>
            <?php
    while($row = $getTableList->fetch_assoc()) {
    echo $row['C']."<br>";
    ?>
        </td>
      </tr>
    </table></p>
    </div>
    <p><!-- end results -->
    <!-- end pageWrapper --></p>
    </div>
    </body>
    </html>

  • BOE XI 3.1 Mysql database connection jar

    Hi All,
    I am new learner for BOE.I installed Business Object Enterpraise 12.0.
    I have created the report WebI rich client and saved in local path, and also some value insert into mysql database table.
    I need to know how its stored into mysql database.
    which jar file is used for creating the connection with mysql database .
    Thanks,
    Yousuf
    Edited by: yousufalam on Dec 31, 2010 12:40 PM

    The connection objects are store in the CI_APPOBJECTS repository table with SI_KIND='Metadata.DataConnection' . The connection properties are stored as property bags along with your objects.
    Unfortunately I have just found a reference that this kind of access in not fully supported though and you may have to use the Universe Designer SDK (COM based)
    Change password of Universe connection using Java SDK?
    Since you are working with the SDK it will make sense to post your questions here:
    Java SDK Application Development
    Regards,
    Stratos

  • Php/MySQL database insert record issue...

    I have a php page that adds an "order" to a mysql database table (orders). One text field in the form is for tires/wheels. The description of the wheels often includes the " symbol for inches after a number....Everything submits fine, however when I look at the page that displays the orders all the data after the " symbol including the " symbol is gone... DOes anyone have any idea why this may be happening? It is requiring us to return and edit that area repeatedly. Any help is appreciated greatly. Thanks for your time.

    Ok, so just to summarize so I am understanding this correctly.  You have an ordering page for tires/wheels.  A customer places an order for tires/wheels and the data is submitted successfully and this includes a symbol for measurement (in.).  But on another summary page the symbol is returning a blank value.
    If this is correct we need to see:
    - First, the code that is inserting the symbol to the database table in question
    - Second, the query and code where you are printing the data to the screen.

  • Convhow to erting MySQL database into oracle Database

    Hi,
    how to import/convert MySQL database/tables into oracle database/table.
    i need SQL code or any import wizard technique.
    Thnxz

    Please refer:
    http://www.oracle.com/technology/tech/migration//workbench/index_sqldev_omwb.html

  • Updating tableview back into database table

    I am trying to display a recordset from mysql database table into a tableview in javafx. Maybe let's say get all records where invoice number is 101 i n the master table from the child records in the child table.(This is a typical master detail scenario.) After this I update the tableview add, delete, edit some records AND then I want to save this Tableview or rather update it back, synchronise into the database table.
    I request you to kindly help with sample code or any guidelines that will help me in this objective.

    Here is the tutorial of tableView : http://docs.oracle.com/javafx/2/ui_controls/table-view.htm
    You can use the Java Class that mapped the database for ObservableList. Get all the record in the database and cover it to the java object. Then add them to the ObservableList to show on TableView. After add, update, edit,... Get the item in the ObservableList and update back to your database.
    I can't tell in detail. You should try this tutorial and if there are any more Specific Issue you can post another question here.

  • Newbie ques : How to get the list of all tables in the database

    Hi,
    I'm very new to Oracle (using Oracle8i currently). I wanted to know if there is a way to get the list of all tables in the database. Like in mySQL you can use the command " show tables" to get the list of all the tables.
    Any help will e greatly appreciated. Please "cc" any reply to [email protected] also.
    thanks
    Deven

    Hi
    Select table_name, owner from all_tables;
    will give u all the tables in the database.
    all_tables, dba_tables, user_tables
    all_objects, dba_objects, dba_objects
    there are many, more tables. login as system and query the tab and try to describe the tables.
    Thanks
    Malar

  • "Economizing" in a list of maps with identical keys (like a database table)

    Hi there!:
    I've been checking this forum for information about something like what I state in the title of this message, but haven't found such a specific case. I'm commenting my doubt below.
    I'm working with a list of maps whose keys are exactly the same in all them (they're of type String). Indeed it could be considered an extrapolation of a database table: The list contains maps which act as rows, and every map contains keys and values which represent column names and values.
    However, this means to repeat the same key values on every map and this spends memory. Right, maybe it's not such a big spent, but since the list can contains thousands of maps, I think that it would be better to choose a more "economical" way to achieve the same result.
    I had thought about building a class which stored everything as a list of lists and, internally, it mapped that String keys with the corresponding Integer indexes of every list. But then I realized that maybe I was re-inventing the wheel, because it's very probable that someone has already made that. Maybe is there a class on the Core API which allows that?
    Thank you very much for your help.

    Well, after re-reading the Java tutorial which is located in the Sun website I've came to a conclusion which I should have before, when I thought about using StringBuffers as keys of the maps instead of Strings.
    I'm so used to build Strings using literals instead of the "new String ()" constructor (just as everyone) that I had forgotten that, as it happens with any kind of object but not the primary data types, Strings are not passed to the methods by value, but by reference. The fact of them being immutable made me think that they were passed by value.
    Apart of that, my problem also was that using literals I was creating different String objects every time, despite the fact that they were equal about their content (making 400 different keys called "name" for example)
    In other words, I was doing something like this:
    // It makes a list of maps which will contain maps of boy's personal data (as if they were "rows" in a table).
    List <Map <String, Object>> listData = new ArrayList <Map <String, Object>> (listBoy.size ());
    // It loops over a list of Boy objects, obtained using EJB.
    for (Boy boy : listBoy) {
         // It makes a new map containing only the information which I'm interested on from the Boy object.
         Map <String, Object> map = new HashMap <String, Object> (2);
         map.put ("name", boy.getName ());
         map.put ("surname", boy.getSurname ());
         // It adds the map to the list of data.
         listData.add (map);
    }Well, the "problem" here (being too demanding, but I'm :P ) is that I was adding all the time new Strings objects as keys in every map. The key "name" in the first map was different from "name" in the second one and so on.
    I guess that my knowledge got messed at certain point and thought that it was impossible to use exactly the same String object in different maps (the reference, not the same value!). Thus, my idea of using StringBuffers instead.
    But thinking about it carefully, Why not to do this?:
    List <Map <String, Object>> listData = new ArrayList <Map <String, Object>> (listBoy.size ());
    // It makes the necessary String keys previously, instead of using literals on every loop later.
    String name = "name";
    String surname = "surname";
    for (Boy boy : listBoy) {
         // It uses references (pointers) to the same String keys, instead of new ones every time.
         Map <String, Object> map = new HashMap <String, Object> (2);
         map.put (name, boy.getName ());
         map.put (surname, boy.getSurname ());
         listData.add (map);
    }Unfortunately, the "hasCode" method on String is overloaded and instead of returning the typical hash code based on the single ID of the object in memory, it returns one based on its content. That way I can't make sure that the "name" key in one map refers to the same object in memory than another one. I know, I know. The common sense and the Java documentation confirm that, but had loved having an empiric way to demonstrate it.
    I guess that using "javap" and disassembling the generated bytecode is the only way to make sure that it's that way.
    I believe that it's solved now :) (if no one tells me the contrary). I still am mad at myself for thinking that Strings were passed by value. Thinking about it now it had no sense!
    dannyyates: It's curious because re-reading every answer I think that you maybe were pointing to this solution already. But the sentence "you put the +same+ string" was a little ambiguous for me and thought that you meant putting the same String as "putting the same text" (which I already was doing), not the same object reference (in other words, using a common variable). I wish we could have continued discussing that in depth. Thanks a lot for your help anyway :) .

  • Looking for a value in a list stored in a database table field

    Hello,
    I have a field in a database table that contains a comma
    separated list on numbers. In my CFQUERY I am attempting to extract
    records from the database table where a parsed number is present in
    the comma separated list. I have tried the code below, but it is
    throwing an error.
    variables.publicationID is the number that I am looking for
    in the database table field.
    publicationList is the name of the database table field
    containing the comma separated list of numbers.
    where <cfqueryparam value="#variables.publicationID#"
    cfsqltype="cf_sql_integer"> in publicationList
    Can anybody help?
    Many thanks,
    smnbin

    The only way to do it with the data model you currently have
    is as follows:
    WHERE publicationList LIKE '#variables.publicationID#' OR
    publicationList LIKE '#variables.publicationID#,%' OR
    publicationList LIKE '%,#variables.publicationID#,%' OR
    publicationList LIKE '%,#variables.publicationID#'
    You need to check for 4 cases:
    it's the only ID in the list
    it's the first ID in the list
    it's in the middle of the list
    it's the last ID in the list.
    The better solution would be to replace this comma-delimited
    list with a mapping table, where each row in this mapping table
    contains a reference to the main table as well as a single
    publicationID.

  • How to populate a Table from a WebApplication JSF from a MySQL database

    Hi,
    I'm trying to populate a table on a WebApplication JSF. I don't know how the table can be filled with informations from a MySQL database.
    Please show me the way.

    In the future, JSF related questions should be posted in a forum devoted to JSF: [http://forums.sun.com/forum.jspa?forumID=427].
    Regarding to your question, you may find this article useful: [http://balusc.blogspot.com/2006/06/using-datatables.html].

  • ***No Table found, when creating a recordset to MySQL Database

    I have made a successful connection to the MySQL database.
    When attempting to create a record set (Query) under the Application/Bindings Tab, I select the connection, but then the Table field says *** No Table Found
    Also under Application/Databases tab, the connections appear. When expanding the + for the Table it says "None"
    I do have Tables in the MySQL database which Dreamweaver has a connection to, so that is not the problem.
    I've searched multiple forums on the internet for this problem, and while I have found that others have had this problem, I have not seen any solutions.
    Any help would be greatly appreciated.
    I am a novice in this area, so if you need any additional information from me, please be as specific as possible as to where and how I can get it.
    Thank you in advance for your help.
    Additional information:
    Windows 7 Ultimate
    Dreamweaver CS3 (Creative Suite 3 Web Premium)
    Apache 2.2.15-win32-x86-openssl-0.9.8m-r2
    PHP-5.2.6-Win32
    mysql-workbench-gpl-5.2.25-win32
    Freshly reformatted computer and only installed the above software along with AVG antivirus.
    Edit: I should also note that this is for a local testing server. I am not trying to connect remotely.
    Best Regards,
    Blain
    Message was edited by: Blain1976

    Now the problem has gone from bad to worse.
    I previously had a connection to my database but just couldn't see the tables.
    Now after I added another user I can't even make a connection. Instead I get an error message that says "An unidentified error has occured"
    My server and database are actually running. I can loginto my database through the MySQL workbench. It says it's running. The apache server also says it's running and if I key in localhost in my internet explorer it says "It works!"
    I have now deleted the new user in MySQL  that I added and now I can't even connect to the database in Dreamweaver.
    Any suggestions?
    Thank you,
    Blain

  • How to get the list of database Views modifying the DB tools list tables.vi

    Hi,
    I have a problem, I just started using LabVIEW and in particular the LabVIEW connectivity toolkit and I am lookig fgor suggestion regarding how to get the list of database Views modifying the DB tools list tables.vi...
    Thanks in advance,
    Michela

    Hi Michela,
    since the VI you want to modify is part of a Toolkit, I suggest you to copy the whole block diagram in a new VI and then save it in a new location.
    Place the DB List Tables.vi on a block diagram, double click on it and go to the tab "Window -> Show Block Diagram "
    Select "Edit -> Select All" to select the whole block diagram and select "Edit -> Copy"
    Open a new VI and select "Edit -> Paste"
    Save the new VI
    In this way you can modify everything you want without overwriting the Toolkits VIs.
    Hope this can help.
    Regards, 
    Andrea N.
    Systems Engineer ATE & RF - Mediterranean Region
    National Instruments Italy

  • List Creation From Database Table

    I have a form that has two data blocks based on database tables:
    Block #1 = ORDER_LINE
    Block #2 = ORDER_CODE
    The ORDER_LINE block has an item in it that corresponds to an item in the ORDER_CODE block. I want to create a TLIST for this item in the ORDER_LINE block that populates the list from the values for the corresponding item in the ORDER_CODE block. I know that I can use the POPULATE_LIST built in and need a record group, etc, but I have not been able to make any of this work. Can anyone provide good instructions on how to do this? I find the On Line Help within Forms to be totally useless.
    Thanks.

    976798 wrote:
    --Hello..I want to ask that How to bind a list item with  table values? this below code does not populate items from database to list item.Pls any body give me solution.
    declare
         group_id RecordGroup;
         list_id Item:=Find_Item('LST_CLASS');
         status number;
    begin
         group_id:=Create_Group_From_Query('Answer_List','select CLASS_ID,CLASS_NM from CLASS_MSTR');
         status:=Populate_Group('Answer_List');
         message(to_char(status));
         Populate_List(list_id,group_id);
         end;Welcome to the Oracle Forums. Please take a few minutes to review the following:
    <ul>
    <li>Oracle Forums FAQ
    <li>Before posting on this forum please read
    <li>10 Commandments for the OTN Forums Member
    <li>How to ask questions the smart way
    </ul>
    Following these simple guidelines will ensure you have a positive experience in any forum; not just this one!
    Check this link: How to Dynamically Populate a Pop List ?
    Hope this helps
    Hamid
    If someone's response is helpful or correct, please mark it accordingly.

Maybe you are looking for