in reply to Retrieving a message count on a thread using HTML::Template, and DBI.
Fetching a single row from something like a "select count(*) from..." query doesn't actually require a loop, just a single fetch and then finish.
However, if you were looping over multiple rows a loop would be in order. You could either use HTML::Template's <TMPL_LOOP> tags to do your looping, or you could go through the loop ahead of time, concatenating all of the output into a single variable that you'd pass to your template.
|
|---|