Hello,
I am having some problem with hashref and nested loops. The best way to
explain it is to provide the following example:
$sql = "SELECT ....";
# one record is returned
while ($_ = $sth->fetchrow_hashref()) {
$sql1 = qq{SELECT .... WHERE CID=$_->{ID}};
$sth1->execute()
# 7 records are returned
push @{$short_consolidate}, $_;
push @{$creditor}, $_ while $_ = $sth1->fetchrow_hashref();
push @{$short_consolidate}, {Creditor => \@{$creditor}};
}
$thtml->param(CS => \@{$short_consolidate}, RECORDS => $rv);
I know the problem is that I am pushing two seperate rows into the
short_consolidate array reference. This causes two loops to run instead of
the desired one.
Help, please ...
Roy Rubin
Irubin Consulting - Internet Solutions
[EMAIL PROTECTED]
Phone (310) 402-0120
Toll-Free (888) 9-IRUBIN
http://www.irubin.com/
-------------------------------------------------------
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