in reply to outputting data from mySQL to html template
anyway, why dont you use selectrow_hashref and push the hashrefs onto an array like this:
You could also ask this question on the HTML::Template mailing list. But you get faster responses here.$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);
|
|---|