in reply to outputting data from mySQL to html template

A few administrivia:
  1. I dont think the particular database you are using is relevant-enough to be in the title.
  2. I would have written "html template" as "HTML::Template"

anyway, why dont you use selectrow_hashref and push the hashrefs onto an array like this:

$dbh=DBI->connect($datasource,$user,$pass,{AutoCommit=> 1}) or die "Ca +n't Connect"; $sth=$dbh->prepare("SELECT * FROM Videos WHERE $FieldN LIKE ?") or die +; $sth->execute($SearchCrit); my @template_data; while (my $hashref = $sth->select_hashref()) { push @template_data, $hashref; } $tmpl->param( stuff => \@template_data);
You could also ask this question on the HTML::Template mailing list. But you get faster responses here.