swarddb has asked for the wisdom of the Perl Monks concerning the following question:
if ($query->param('list_name') eq 'Charges by credit card') { $ora_sthheader = $ora_dbh->prepare ( q { select distinct data_name from dwhs.store_reports where report_type = ? } ) || die "Can't prepare statement: $DBI::errstr"; $rcheader = $ora_sthheader->execute($list_name) || die "Can't execute +statement: $DBI::errstr"; print "<table border=3 cellspacing=0 cellpadding=0 width=100%>\n"; my @headers = $ora_sthheader->fetchall_arrayref(); print "<tr>\n"; foreach my $label(@$headers) { my ($header) = @$label; print "<th>$header</th>\n"; } print "</tr>\n"; $ora_sth = $ora_dbh->prepare ( q { select data_name, sum(data_value) from dwhs.store_reports where report_type = ? and timestamp >= sysdate - ? group by data_name } ) || die "Can't prepare statement: $DBI::errstr"; $rc = $ora_sth->execute($list_name,$day_list) || die "Can't execute st +atement: $DBI::errstr"; while ( ($data_name, $data_value) = $ora_sth->fetchrow_array) { $cellvalue{$data_name} = $data_value; } $row=""; foreach $header (@headers){ $row = $row . $query->td({ -bgcolor=>"#CCCCCC", -align=>"cente +r"},[$cellvalue{$header}]); print $query->Tr($row); } $ora_dbh->disconnect; print $query->end_table; print "\n"; print $query->end_html; print "\n"; }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
(jeffa) Re: passing array value to hash not happening
by jeffa (Bishop) on Aug 16, 2001 at 01:46 UTC | |
|
(bbfu) Re: passing array value to hash not happening
by bbfu (Curate) on Aug 16, 2001 at 02:34 UTC |