# select sub sub selectMsgFromDb { my ($self, %params) = @_; $self->checkRequiredParams(%params); my $sth = $dbh->prepare( $cfg->{retrieve_from_sql}->{msg} ); $sth->execute( ); my @msgs; while ( my $thread = $sth->fetchrow_hashref() ){ my (@data) = q[$thread->{id}, $thread->{name}, $thread->{date}, $thread->{subj}, $thread->{day_rate}, $thread->{msg}]; push @msgs, @data; } return @msgs; # code for returning the page my ($content); push @{$content}, $params{-content}; $template->param( MAIN_CONTENT=>$content ); return $template->output; # hash for sql my %sql = ( msg =>'SELECT id, name, date, subj, day_rate, msg FROM mes +sages ORDER BY DATE DESC', reply =>'SELECT id, name, date, subj, day_rate, msg FROM m +essages ORDER BY DATE DESC', insert =>'INSERT INTO ethereal VALUES(0, ?, ?, ?, NOW(), ? +)' );
In reply to HTML::Template problems by stonecolddevin
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |