As far as I know the code below works like:

{ 
   my $data;
   while ( $data = ...
}

Which is incorrect as the examples before. The problem is that fetchrow_hashref 
returns always the reference to the same hash and only updates the values. After all 
loops you will have an array of N elements referencing the sames values.

Try:

my @rows = ();
while ( my $row = $sth->fetchrow_hashref() ) {
  my %data = %$row;
  push @rows, \%data;
}
$template->param(ROWS => \@rows);



-------------------------------------------------------
This sf.net email is sponsored by:ThinkGeek
Welcome to geek heaven.
http://thinkgeek.com/sf
_______________________________________________
Html-template-users mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/html-template-users

Reply via email to