Also, as a side note, why are you using DBIx::XHTML_Table. To me it
would seem like that would definitely limit the control you have over
the table layout, structure, look and feel, etc.

When displaying tables like that from a db I usually use Class::DBI and
make each element of a retrieve() an iteration of a TMPL_LOOP H::T or a
[% FOR %] in TT.

HTH,
Michael Peters
Developer
PlusThree

Robert wrote:
My meager Perl skills are probably killing me on this one. I am trying to
use the module in question to get info out of a database nicely format it
and then plaster it into my html page.

sub open_tickets {
    my $self = shift;

    # The message
    my $page_header = 'Open Tickets';

    # Open the desired template
    my $template = $self->load_tmpl('open.tmpl', cache => 1);

    # Connect
    my $table_db = DBIx::XHTML_Table->new('dbi:Oracle:dbname', 'user',
'pass',
        { RaiseError => 1, }
    );

    # SQL query to get all open tickets
    $table_db->exec_query("
        select *
        from users
    ");

    my $table_data = $table_db->output();   # this is probably it, though I
am not sure.

    $table_db->disconnect;

    # Fill in params
    $template->param(
        page_header => $page_header,
        page_data => $table_data,
    );

    # Parse the template
    my $html_output = $template->output;
    return $html_output;
}


I have "strict" and "warnings" on and no errors are generated.

Robert




--------------------------------------------------------------------- Web Archive: http://www.mail-archive.com/[EMAIL PROTECTED]/ http://marc.theaimsgroup.com/?l=cgiapp&r=1&w=2 To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]



---------------------------------------------------------------------
Web Archive:  http://www.mail-archive.com/[EMAIL PROTECTED]/
             http://marc.theaimsgroup.com/?l=cgiapp&r=1&w=2
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Reply via email to