Hi guys, I have have a perl page that I want to generate an html drop down list box. The data in the list box comes from an oracle database. I am using oraperl to try and do this. Each line of the list box needs to be each line(row) of the data coming from the database table. There are four fields in each line(row) of the database table. My question is what is the best way to go about doing this? I have been trying to play with the fetch command like this:
sub make_list { $sql = "select * \n"; $sql .= "from e1_attrib_type \n"; $cur = &ora_open($lda, $sql); while ( (@d) = &ora_fetch($cur)) { @ln[$i] = $d[$i]; } &ora_close($cur); return( @ln ); }
but obviously this is not right :-) I can't sem to think of the right way to go about generating this list box. Thanks for your help guys..

In reply to generating list box form oracle database by new_2_perl

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.