Dynamic html table

Hello
I try to make a dynamic array that will return the topics, all rows in the emp table. Let's say I made the process on the page what contect back simple table.

-The processes on the laundry after region-
DECLARE
totalRows INT;
Str VARCHAR2 (300);

CURSOR c_emp
IS
SELECT ename, empno, mgr
EMP;
BEGIN
HTP.p ("< table style =" border: 1px solid; ' > ' ");

I'm IN c_emp
LOOP
HTP.p ("< tr >");
HTP.p ("< style td =" border: 1px solid black; "> ' |") i.EmpNo | "< table >');
HTP.p ("< style td =" border: 1px solid black; "> ' |") i.Ename | "< table >');
HTP.p ("< style td =" border: 1px solid black; "> ' |") i.Mgr | "< table >');
HTP.p ("< /tr >");
END LOOP;

HTP.p ("< /table >");
END;
-----------------------------------------------------------------------------------------------------

How to include the titles of the columns dynamically? And how to make more intelligent?

Thx for the help and good ideas!

Hello

An example

DECLARE
  l_cursor  INTEGER := dbms_sql.open_cursor;
  l_qry     VARCHAR2(32000);
  l_status  NUMBER;
  l_cvalue  VARCHAR2(32000);
  l_col_cnt NUMBER;
  l_desc_t dbms_sql.desc_tab2;
  l_desc_c dbms_sql.desc_tab;
BEGIN
  l_qry := 'SELECT * FROM emp';
  dbms_sql.parse (l_cursor, l_qry, dbms_sql.native);
  dbms_sql.describe_columns( l_cursor, l_col_cnt, l_desc_c );
  htp.p('');
  htp.p('');
  htp.p('');
  FOR i IN 1 .. l_desc_c.count
  LOOP
    NULL;
    htp.prn('');
  END LOOP;
  htp.p('');
  htp.p('');
  htp.p('');
  dbms_sql.describe_columns2( l_cursor, l_col_cnt, l_desc_t );
  --
  FOR i IN 1 .. l_desc_t.count
  LOOP
    dbms_sql.define_column( l_cursor, i, l_cvalue, 32765);
  END LOOP;
  l_status := dbms_sql.execute( l_cursor );
  LOOP
    EXIT
  WHEN (dbms_sql.fetch_rows( l_cursor ) <= 0 );
    --l_row_cnt      := l_row_cnt + 1;
    htp.p('');
    FOR i IN 1 .. l_desc_t.count
    LOOP
      dbms_sql.column_value( l_cursor, i, l_cvalue );
      htp.prn('');
    END LOOP;
    htp.p('');
  END LOOP;
  htp.p('');
  htp.p('
' || l_desc_c(i).col_name || '
' || l_cvalue || '
'); IF dbms_sql.is_open(l_cursor) THEN dbms_sql.close_cursor(l_cursor); END IF; EXCEPTION WHEN OTHERS THEN IF dbms_sql.is_open(l_cursor) THEN dbms_sql.close_cursor(l_cursor); END IF; RAISE; END;

Tags: Database

Similar Questions

  • Help! &gt; How to send a dynamic HTML table as an email?

    Hello


    I want to send a dynamic html table as an email


    I'm using php/mysql and I have a mysql database


    I have a table dynaimc restrained some data from the database


    I have a form with a text box to write the email and a button "submit"


    I want to send the picture (or the information in the table) when I send the form


    is this possible?


    Help, please!

    OK, now I have you.  You create a queary to select the data you want, and then copy the following code

    $data = mysqli_query ($dbc, $query) or die (mysqli_error ($dbc));

    While ($row = {mysqli_fetch_array ($data))}

    Mail to the owner of the form

    $header = "from: [email protected]\n".

    . "Reply-To: $email\n";

    $subject = 'DB in emails data';

    $email_to = "[email protected]";

    $message =

    $row ["FirstName"].

    $row ['last_name']

    ;

    }

    mail ($email_to, $subject, $message, $header);

    So, for each column, you will enter in this

    $row ["FirstName"].

    So if the column reported, you would put

    $row ["State"].

    I hope this is the answer you are looking for.

    Gary

  • JSON data in HTML table

    I'm new to jQuery, animate edge and this Forum... and pretty novice to HTML5 and CSS3, so I could really use a help please :-)

    I have a JSON file with many records.  I wish that each record to represent a row in an html table.  The JSON file gets written each night courses, and the number of records in the JSON file will often change.  I want to write the values of the file in a dynamic html table and then use different animations to set the table on the stage!  Possible?  Or is there a better way?

    My JSON example:

    [{'id': 1,}]

    'Division': 'Austin ',.

    'txt_one': 9,.

    'txt_two': 5,.

    'txt_three': 20,.

    "txt_four": 5

    },

    {"id": 2}

    'Division': 'Houston ',.

    'txt_one': 0,

    "txt_two": 4.

    'txt_three': 0,

    'txt_four': 7

    },

    {"id": 3}

    "Division':"Phoenix. "

    'txt_one': 1,.

    'txt_two': 2.

    "txt_three": 3.

    "txt_four": 6

    }]

    (1) the html option (table symplistic).

    (A) code:

    var myList = {lines: []}

    {'id': 1, 'Division': 'Austin', 'txt_one': 9, "txt_two": 5, "txt_three": 20, "txt_four": 5},

    {'id': 'Division' 2: "Houston", "txt_one": 0, "txt_two": 4, "txt_three": 0, "txt_four": 7},.

    {'id': 3, 'Division': 'Phoenix', 'txt_one': 1, 'txt_two': 2, 'txt_three': 3, 'txt_four': 6}

    ]};

    var lines ="";

    .each $(myList.rows, {function(index,item)}

    "lines += '.'+' + item.id"+ point. "Division.'+ item.txt_one +''+ item.txt_two +''+ item.txt_three +''+ item.txt_four +'";

    } );

    .html ("$("Text") sym.

    "+ lines +".
    ");

    SYM. $("table") .css ("width", sym.$("Text").width ());

    SYM. $("table, td") .css ({'border': "1px solid black", "border-spacing": "5px"})

    SYM. $("tr") .css ("background", "#acc5a0");

    SYM. $("td") .css ("text-align", "center") .css ("color", "white");

    (B) back on stage:

    (2) the display option.

    Could you please send a file with your model of symbol?

    I mean your line template.

  • Firefox can't find the text on the HTML table cells

    Firefox cannot find (Ctrl + F) the text inside HTML tables, as in
    http://www.dip-Badajoz.es/BOP/ventana_anuncio.php?id_anuncio=22714 & FechaSolicitada = 2008-02-20
    If you try to search "Solano", Firefox will not find any matches, but "Solano" is here. This works fine on Chrome, for example.

    Thank you

    I am also on Linux, but if I start a version of Firefox 6 via Wine the I don't have a problem with a search for "Solano".

    Start Firefox in Firefox to solve the issues in Safe Mode to check if one of the extensions of the origin of the problem (switch to the DEFAULT theme: Firefox (Tools) > Add-ons > appearance/themes).

  • Microsoft (r) dynamic HTML ending control

    I have windows xp service Pack 3.  Can I download movies on a memory card or USB without this dynamic HTML end control of Microsoft (R). I keep showing up to download.  When I went to the microsoft site for more information on what this was, this is for Windows Vista, I did not witch.  Can I still download with it.

    Thank you

    Alvinizer

    Yes, you can download...

    http://www.wilderssecurity.com/showthread.php?t=251791

    http://msdn.Microsoft.com/en-us/library/ms537834%28V=vs.85%29.aspx

  • Display HTML table in the BBUI screen

    I want to write an application that displays a custom calendar (month view). Now, I use java script to render an HTML table, and insert this code in the data screen as below.

    function viewSelectedMonth() will make only the HTML for the table. But when I run the action menu does not work. Could you tell?


       


           
    Help

           
    On

           
    Parameters

       


        
        


       


           

    Home

           
    Toast


           

    Today


    Hi there, I don't have an exact answer as to why your code behaves like that.

    The best thing I can say is that you use Web Inspector to debug your application. If there are errors as they appear in the Console of the Web Inspector, and you will be able to solve much better.

    More info @ https://developer.blackberry.com/html5/documentation/v2_2/getting_started_web_inspector.html

  • How can I filter the data and display it in the html table?

    Hello

    How do I filter data that contains the database table and already displayed in html table, then when the user write a data to filter or search, it will automatically display the data in html table. ?

    can someone help me to do this? Here is my php code for the table that will display the data:

    <?php
      $servername = "localhost";
      $username = "root";
      $password = "pass";
      $dbname = "ses";
       
       
      // Create connection
      $conn = new mysqli($servername, $username, $password, $dbname);
      // Check connection
      if ($conn->connect_error) {
      die("Connection failed: " . $conn->connect_error);
      }
       
      $sql = "SELECT No, Calon, ID, Jurusan FROM candidates";
    
      $result = $conn->query($sql);
      ?>
    
    <?php
      if ($result->num_rows > 0) {
      echo "<table >
    
      <tr>
      <th>NO</th>
      <th>Candidate</th>
      <th>ID Number</th>
      <th>Programme</th>
      <th>Edit</th>
      <th>Delete</th>
      </tr>";
      // output data of each row
      while($row = $result->fetch_assoc()) {
      echo "<tr>
      <td align='center'>" . $row["No"]. "</td>
      <td>" . $row["Calon"]. "</td>
      <td>" . $row["ID"]. " </td>
      <td>" . $row["Jurusan"]. "</td>
      <td align='center'><a href='main2.php?edit=".$row["No"]."'>Edit</a></td>
      <td align='center'><a href='delete.php?del=".$row["No"]."'>Delete</a></td>
      </tr>";
      }
    
      echo "</table>";
      } else {
      echo "0 results";
      }
      $conn->close();
      ?>
    

    hope someone can help me with this.

    Thank you.

    You must first create a search form for the user to enter a search word:

    Then create a page named search_page.php and insert the following code into it and save it. The code in red below Gets information from the search form field name = "Calon" and the SQL query finds in the "Calon" database field for a game.

    <>

    $servername = "localhost";

    $username = 'root ';

    $password = "pass";

    $dbname = 'his ';

    Create the connection

    $conn = new mysqli ($dbname, $servername, $username, $password);

    Check the connection

    If {($conn-> connect_error)

    Die ("connection failed:".) $conn-> connect_error);

    }

    $Calon = trim($_POST['Calon']);

    $sql = (' SELECT no, Calon, ID, Jurusan candidates WHERE Calon = "'.") $Calon.' » ") ;

    $result = $conn-> Query;

    ?>

    <>

    If ($result-> num_rows > 0) {}

    ECHO '.

    ";

    each line output

    While ($row = {$result-> fetch_assoc())}

    ECHO '.

    ";

    }

    ECHO '.

    NO. Candidate Identification number Program Edit Delete
    " . $row ["no"]. " " . $row ["Calon"]. " " . $row ['ID']. " " . $row ["Jurusan"]. " Edit Delete
    ";

    } else {}

    echo "0 results."

    }

    $conn-> close();

    ?>

  • Problem with HTML table.

    Urgent please. I have a table with two rows. In each line, I'll add a few separate images in columns/cells. On the first line, the images will fill all the columns. But (!) on the first line, I'll add pictures only on left (fixed to the left) and the right (fixed to the right) and I want every cell of these two broad 8px, so I can keep the Middle wide enough to add text and empty. But I can't do it!

    Here's a JSfiddle my work online.

    http://jsfiddle.NET/mdermez32/pcmz4ysk/2/

    Why can't I just have two rows of a table and each line have two or more cells with fixed width?

    You can, but you have no guarantee in a way that will be rendered (or display) in all browsers on every computer and mobile device out there.

    HTML tables are elastic by nature and love to develop according to their content and fill any container they are in (div block etc.). Trying to control a single table to perfection perfect pixel is bound to frustrate you.

    Nested tables has long been the most reliable solution for the specific page layouts such as you are aiming for.

  • Create a Page item: stop and start the HTML Table presentation - location?

    Where is the "Create Item-> stop and start HTML Table Layout Page" located at? I can't find it.

    kilo1-1 wrote:
    Where the "create point Page--> stop and start HTML layout table" is located at? I can't find it.

    4.2 elements 'Stop and start in HTML table' are replaced by setting new Start grid in grid presentation properties of each element.

    (Please always indicate which version APEX your question relates to.)

  • Display the values of the Page element in HTML table

    Hi all

    could you please help me with the below? I want to have a table in the HTML area and to display in the table of elements of the Page of the page.

    I got the code like this:
    {
    < table >
    < tr > < td > & P1_ECEMEA_ASSISTANCE < table > < /tr >
    < tr > < td > & P1_ECEMEA_WIP < table > < /tr >
    < /table >
    }
    It shows the element of the Page names in the form of text, not the values.

    However, this code without the tags table:
    {
    ECEMEA request for Assistance of the CQT: & P1_ECEMEA_ASSISTANCE.
    ECEMEA CQT Work in Progress: & P1_ECEMEA_WIP.
    }
    Works and Page element values are displayed.

    Is it possible to display the values of the Page element in the HTML table at all or should I use a different method to show the values in a table? The above is only an excerpt of the code. I need to display about 30 items in Page, put in shape in a table with headers.

    Please let me know what kind of region is the best to use, or if I have to use only a few symbols of escape in the table code...

    Thank you and best regards,

    Vladimir

    Vladimir,

    Looks like you're missing the period after the substitution variables.

    {
    
    &P1_ECEMEA_ASSISTANCE.
    &P1_ECEMEA_WIP.
    }

    -D.

  • JSF component to create a html table view

    Jdev 11.1.1.4

    I would like to know what is the preferred jsf component create a view in an HTML table.

    My screen must have a 'head of column table' and 'line the table header '. It is composed of several rows and columns. In each cell, I need to insert a different inputText mapped to the different attributes of VO. I have many attributes of VO... (one per cell). Something like a MS-Excel crosstab table.

    I am currently using a real html table, but I'm having some problems when the contents are adjusted inside a cabinet (sometimes the right side of the table out of the box of control panel). I also have problems with the help toolltip (property shortdesc) text that sometimes does not display exactly where are the input fields and the shadow of this ToolTip apears incorrectly overlapping content (in fact the ToolTip apperars in one place and he the shadow in a different place from the screen like a gray rectangle.)

    I don't know if all this strange behaviors could be caused due to the use of html tables.

    Hello

    Check this box
    http://MyFaces.Apache.org/Trinidad/Trinidad-API/tagdoc/trh_tableLayout.html

    Kind regards

  • Dynamic temporary Table in stored procedure

    Dear expert,

    I'm trying to convert a database from MSSQL to Oracle 11 g. But I'm a little stuck on dynamic temporary tables in stored procedures.

    MS is normalize the data out dynamic SQL statements. In TSQL so I've created a Temp table with the number of columns that the SQL statement has, that I executed the SQL statement in the temporary table and then I was going to all the columns with the prompting separate command standard. Finally, I wrote the key table.

    If I want to do this process with only on SP, dynamic, rather than to define for each normalization process its own SP, so this possiple in Oracle?

    For example. "INSERT INTO Temp (PartNo, Descr, Type, price) SELECT PartNo, Descr, price from parts.

    PartNo. Descr | Type | Price
    AB00 | AKER GD245 | Monitor | 200.00
    AB01 | Samir QQ22 | Monitor | 120.00
    AQ05 | HB 5500DN | Printer | 550.00

    SELECT @R = Max (PartKey) of N_Parts
    INSERT INTO N_Parts (PartKey, PartNo) SELECT RowNum + @R, PartNo FROM (SELECT DISTINCT PartNo FROM Temp INCLUDING PartNo NOT IN (SELECT PartNo of N_Parts));
    SELECT @R = Max (PartDKey) of N_PartsDescr
    INSERT INTO N_PartsDescr (PartDKey, Descr) SELECT RowNum + @R, Descr FROM (SELECT DISTINCT Descr FROM Temp WHICH Desrc NOT IN (SELECT Desrc from N_Parts));
    ...

    Insert into Part_Data (PartKey, PartDKey, PartTKey, PartPKey)
    SELECT T0. PartKey, T1. PartDKey, T2. PartTKey, T3. Temp PartPKey T
    INNER JOIN N_Parts T0 to T0. PartNo = T.PartNo
    JOIN IN-HOUSE...

    So what is the best way, do not generate this dynamic Table Temp?

    Published by: 926165 on 08.04.2012 08:26

    926165 wrote:
    I'm trying to convert a database from MSSQL to Oracle 11 g. But I'm a little stuck on dynamic temporary tables in stored procedures.

    Just my 2 cents here.

    Conversion of database provider A to B of database provider is never really a great idea. The products are fundamentally different in many ways. Analysis of demand that needs to be ported from database at database B and then its implementation in a specific way to take advantage of the features of your new environment, accounting for all the differences between the implementations of provider will be your best bet.

    I say this because, for me at least, a conversion means that you take what you have and it in slam in what you need. The better approach is to analyse, design (to explain the differences in behavior between vendor implementations, such as mechanisms for read consistency) and proceed from there. This way, you have a solid base on which to start, instead of a skyscraper built out of toothpicks.

    See you soon,.

  • My html table does not appear on the 2nd tab on the Panel (muse widget)

    The same table works fine on the first tab, however when I try to click on the second table in the page mode or overview of the browser on browser, my table is not displayed. Tips to solve this problem?

    If I get this right, you use the tabbed panel widget to display an HTML table in each of the tabs. If this is the case, please make sure that you insert the HTML content on each content area of the tab respectively. To check this, switch between tabs in design mode to check your content.

    Thank you

    Vinayak

  • HTML Table tag...

    Dear all,

    I have an obligation to have simple tabular data.
    If I managed to do it like this
    <f:verbatim>
                    <table width="100%" border="1" class="column" cellpadding="3" cellspacing="0">
                      <tr bgcolor="#ECEDF0">
                        <td><af:outputText id="ot2" value=" " escape="false"/></td>
                        <td><af:outputText id="ot3" value="Status" inlineStyle="margin:4.0px;"/></td>
                        <td><af:outputText id="ot4" value="Date"
                                   inlineStyle="margin:4.0px;"/></td>
                        <td><af:outputText id="ot5" value="Upd By"
                                inlineStyle="margin:4.0px;"/></td>
                        <td><af:outputText id="ot6" value="Co-ordinator" inlineStyle="margin:4.0px;"/></td>
                      </tr>
                      <tr>
                      <td  bgcolor="#ECEDF0"><af:outputText id="ot12" value="Overall"
                                   inlineStyle="margin:4.0px;"/></td>
                        <td  bgcolor="#FFFDFD"><af:outputText id="ot8"
                                   value="#{bindings.xx.inputValue == null || bindings.xx.inputValue == '' ? '' : bindings.xx.inputValue }
                                          #{bindings.xx.inputValue == null || bindings.xx.inputValue == '' ? '' :  '(' }
                                          #{bindings.xx.inputValue == null || bindings.xx.inputValue == '' ? '' :  bindings.xx.inputValue }
                                          #{bindings.xx.inputValue == null || bindings.xx.inputValue == '' ? '' :  ')' }"
                                   inlineStyle="width:150px; margin:4.0px;"/></td>
                        <td><af:outputText id="ot9"
                                   value="#{bindings.xx.inputValue}"
                                   inlineStyle="margin:4.0px;">
                      <af:convertDateTime pattern="#{bindings.xx.format}"/>
                    </af:outputText></td>
                        <td><af:outputText id="ot10" inlineStyle="margin:4.0px;"
                                   value="#{bindings.xx.inputValue}"/></td>
                        <td><af:outputText id="ot11" inlineStyle="margin:4.0px;"
                                   value="#{bindings.xx.inputValue}"/></td>
                      </tr>
                      <tr>
                      <td  bgcolor="#ECEDF0"><af:outputText id="ot22" value="Tech"
                                   inlineStyle="margin:4.0px;"/></td>
                        <td><af:outputText id="ot13" inlineStyle="margin:4.0px;"
                                   value="#{bindings.xx.inputValue == null || bindings.xx.inputValue == '' ? '' : bindings.xx.inputValue }
                                          #{bindings.xx.inputValue == null || bindings.xx.inputValue == '' ? '' :  '('}
                                          #{bindings.xx.inputValue == null || bindings.xx.inputValue == '' ? '' :  bindings.xx.inputValue}
                                          #{bindings.xx.inputValue == null || bindings.xx.inputValue == '' ? '' :  ')'}"/></td>
                        <td><af:outputText id="ot14" inlineStyle="margin:4.0px;"
                                   value="#{bindings.xx.inputValue}">
                      <af:convertDateTime pattern="#{bindings.xx.format}"/>
                    </af:outputText></td>
                        <td><af:outputText id="ot16" value="#{bindings.xx.inputValue}"
                                   inlineStyle="margin:4.0px;"/></td>
                        <td><af:outputText id="ot15" inlineStyle="margin:4.0px;"
                                   value="#{bindings.xx.inputValue}"/></td>
                      </tr>
                      <tr>
                      <td  bgcolor="#ECEDF0"><af:outputText id="ot17" value="Legal"
                                   inlineStyle="margin:4.0px;"/></td>
                        <td><af:outputText id="ot18" inlineStyle="margin:4.0px;"
                                   value="#{bindings.xx.inputValue == null || bindings.xx.inputValue == '' ? '' : bindings.xx.inputValue }
                                          #{bindings.xx.inputValue == null || bindings.xx.inputValue == '' ? '' :  '(' }
                                          #{bindings.xx.inputValue == null || bindings.xx.inputValue == '' ? '' :  bindings.xx.inputValue }
                                          #{bindings.xx.inputValue == null || bindings.xx.inputValue == '' ? '' :  ')' }"/></td>
                        <td> <af:outputText id="ot19" inlineStyle="margin:4.0px;"
                                   value="#{bindings.xx.inputValue}">
                      <af:convertDateTime pattern="#{bindings.xx.format}"/>
                    </af:outputText></td>
                        <td><af:outputText id="ot20" inlineStyle="margin:4.0px;"
                                   value="#{bindings.xx.inputValue}"/></td>
                        <td><af:outputText id="ot21" inlineStyle="margin:4.0px;"
                                   value="#{bindings.xx.inputValue}"/></td>
                      </tr>
                    </table>
                  </f:verbatim>
    You can see that there are a lot of style...
    I decided to use h:panelGrid but it doesnot give me much comfort wrt style... especially if I want to do for a cell.
    It is for me a correct output... no errors except under the direction of jdeveloper gives me redmarks...

    I know this isn't a code of good practice and not recommended but is at - it another alternative...?
    Any idea on 3rd lib left... as (html:table... html:td... html:tr. ike stuff).

    Kind regards
    Sicard.

    JDeveloper 11.1.1.4.0

    Arrrrrrrgs! ... your code looks like a recipe from hell (Smiley)

    Instead, try to Trinidad

    TRH:tableLayout
    TRH:rowLayout
    TRH:cellFormat

    You can add libraries of the Trinity to your ADF Faces project by mosue right click in the Compoennet Palette and choosing "Edit tag libraries". Select the 'Trinity HTML' library

    Frank

  • How to convert/parse an html table

    Hello

    I have a string containing an html table code...

    < table >

    < b >

    < td > 1 < table > column

    < td > column 2 < table >

    < td > 3 < table > column

    < /tr >

    < b >

    Row1Value1 < td > < table >

    Row1Value2 < td > < table >

    Row1Value3 < td > < table >

    < /tr >

    ... etc...

    < /table >

    Actually I would like to have the contents of the table in a query (like this) in an xml structure or in a CF structure or in a table or whatever. I tried to do with XMLParse but I have not it - I'm not understand DTDS or what ever he needs.

    Is there a simple way for a beginner like me?

    Thank you very much!

    From here all you have to do to get the 3 values of Word; number, is to treat the string as one | delimited list.

Maybe you are looking for