Hi folks:
The following code repeats the same row over and over again in HTML, though
the %row hash writes correctly to the debug file...
any ideas?
=================================================
my @loop; # the loop data will be put in here
$passedquery = "select id, lname, fname, email from member";
$sth = $dbh->prepare($passedquery) || die $dbh->errstr;
$sth->execute || die $dbh->errstr;
my $names = $sth->{'NAME'};
my $numFields = $sth->{'NUM_OF_FIELDS'};
open (FH, ">debug.txt");
while ($ref = $sth->fetchrow_arrayref) {
for (my $i = 0; $i < $numFields; $i++) {
$row{$$names[$i]} = $$ref[$i];
}
while (($k, $v) = each %row) {print FH "$k=>$v\t"};
print FH "\n";
push(@loop, \%row);
}
close(FH);
# call param to fill in the loop with the loop data by reference.
$template->param(passed_loop => \@loop);
========================================================
_________________________________________________________________
Chat with friends online, try MSN Messenger: http://messenger.msn.com
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]