Winfried Trumper > Text-Placeholder-0.04 > Text::Placeholder::Appliance::SQL::Retrieval_n_Display

Download:
Text-Placeholder-0.04.tar.gz

Dependencies

Annotate this POD

View/Report Bugs
Source  

NAME ^

Text::Placeholder::Appliance::SQL::Retrieval_n_Display - SQL table listing

SYNOPSIS ^

        use Data::Dumper;
        use Text::Placeholder::Appliance::SQL::Retrieval_n_Display;

        my %values = (
                'cond_some_value' => '99'
        );

        my $rnd = Text::Placeholder::Appliance::SQL::Retrieval_n_Display->new;
        $rnd->html_parameter(
                '<td>[=fld_some_name=]</td>
                <td>[=fld_other_name=]</td>');
        my ($statement, $value_names) = $rnd->sql_parameter(
                'SELECT [=field_list=]
                FROM some_table
                WHERE some_field = [=cond_some_value=]');
        my @values = map($values{$_}, @{$value_names});
        #my $rows = $dbh->selectall_arrayref($statement, {}, @values);
        my $rows = [[4..6], [qw(A B C)]];
        $rnd->format($rows);

        print Dumper($statement, \@values, $rows);

DESCRIPTION ^

Text::Placeholder::Appliance::SQL::Retrieval_n_Display takes a HTML format and a SQL statement format and produces a table listing from it. It's an example how to build an appliance from placeholder groups.

KNOWN BUGS AND LIMITATIONS ^

This is the first public release.

AUTHOR ^

Winfried Trumper <pub+perl(a)wt.tuxomania.net>

COPYRIGHT AND LICENSE ^

Copyright (C) 2011 Winfried Trumper

This module is free software; you can redistribute it and/or modify it under the same terms as Perl itself.

syntax highlighting: