swarddb has asked for the wisdom of the Perl Monks concerning the following question:
tia,while ( ($timestamp, $report_type, $data_name, $data_value) = $ora +_sth->fetchrow_array) { $key=$timestamp . "," . $report_type; if ($data_name eq "minutes") {$data_value = $data_value * 1440 +}; if ($data_name eq "minutes") {$data_value = sprintf("%9.2f",$d +ata_value)}; $timestamps{$timestamp}=1; push @reporttypes, $report_type; $cellvalue{$key} = $data_value; } foreach $headingkey (@headings) { $row = $row . $query->th($headingkey); } print $query->Tr($row); foreach $timestamp (sort keys %timestamps) { $row = $query->td($timestamp); foreach $headingkey (@headings) { if ($headingkey eq "Timestamp") {next;} $key=$timestamp . "," . $headingkey; $row = $row . $query->td($cellvalue{$key}); } print $query->Tr($row); }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Time sorting please help
by grinder (Bishop) on Jul 18, 2001 at 01:34 UTC | |
|
Re: Time sorting please help
by malloc (Pilgrim) on Jul 18, 2001 at 01:30 UTC | |
by swarddb (Novice) on Jul 18, 2001 at 20:53 UTC | |
|
Re: Time sorting please help
by voyager (Friar) on Jul 18, 2001 at 01:26 UTC | |
by swarddb (Novice) on Jul 18, 2001 at 20:50 UTC | |
by voyager (Friar) on Jul 18, 2001 at 22:41 UTC |