|
I have attempted to make HTML-Template to work with
DBI and fetching database results using
Perlmonk code:
push @{$rows}, $_ while $_ =
$sth->fetchrow_hashref();
my $template = HTML::Template->new(filename => 'songs.tmpl'); $template->param(ROWS => $rows); print $template->output();
and code here:
my $template = HTML::Template->new( filename
=> 'showclient.html' ) ;
my ($data,$rows,$template); while( $data = "$sth->fetchrow_hashref()" ) { push( @{$rows} , $data ); } $template->param( { ROWS => $rows } ) ; print $template->output(); It always fails on template->param function. I
know about fetchall but I also read it creates more work for Perl so I stook to
this. Please help me out.
|
- RE: [htmltmpl] HTML-Template and DBI Doc
- RE: [htmltmpl] HTML-Template and DBI Ben Ausden
- RE: [htmltmpl] HTML-Template and DBI Ben Ausden
- RE: [htmltmpl] HTML-Template and DBI Smejkal Petr
- Re: [htmltmpl] HTML-Template and DBI Norikatsu Shigemura
- Re: [htmltmpl] HTML-Template and DBI Doc
