Perhaps something like this?
... my $sql = 'select count(*) from replies where reply_id=?'; my $sth = $dbh->prepare($sql) or die $dbh->errstr; ... my $rc = $sth->execute($q->param('id')) or die $sth->errstr; my ($count) = $sth->fetchrow_array if ($rc == 1); ...
In reply to Re: Retrieving a message count on a thread using HTML::Template, and DBI.
by Mr. Muskrat
in thread Retrieving a message count on a thread using HTML::Template, and DBI.
by stonecolddevin
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |