in reply to Retrieving a message count on a thread using HTML::Template, and DBI.

Incorporate it into HTML::Template? Well, you do the DBI calls in your Perl code, then you pass the calculated value as a param to the template:
my $rc=$sth->execute... my $tmpl=HTML::Template->new... if ($rc==1) { my ($count)=$sth->fetchrow_array; # I only use this when fetching a +single value # otherwise I use fetchrow_hashref $tmpl->param(replycount=>$count); } ... # lots more code, presumably print $tmpl->output;
  • Comment on Re: Retrieving a message count on a thread using HTML::Template, and DBI.
  • Download Code