- 01
- 02
- 03
- 04
- 05
- 06
- 07
- 08
- 09
- 10
- 11
- 12
- 13
- 14
- 15
- 16
- 17
- 18
- 19
- 20
- 21
- 22
- 23
- 24
- 25
- 26
- 27
- 28
- 29
- 30
- 31
- 32
- 33
- 34
- 35
- 36
- 37
- 38
- 39
- 40
- 41
- 42
- 43
- 44
- 45
- 46
- 47
- 48
- 49
- 50
- 51
- 52
- 53
- 54
- 55
- 56
- 57
- 58
- 59
- 60
- 61
- 62
- 63
- 64
- 65
- 66
- 67
- 68
- 69
- 70
- 71
- 72
- 73
- 74
- 75
- 76
- 77
- 78
- 79
- 80
- 81
- 82
- 83
- 84
- 85
- 86
- 87
- 88
- 89
#!/usr/bin/perl
while ($colresults = $rez->fetchrow_hashref()) {
$hour = $colresults->{'TIME'};
if ($hour == '00') {$value0 = $colresults->{'VALUE_NUM'}};
if ($hour == '01') {$value1 = $colresults->{'VALUE_NUM'}};
if ($hour == '02') {$value2 = $colresults->{'VALUE_NUM'}};
if ($hour == '03') {$value3 = $colresults->{'VALUE_NUM'}};
if ($hour == '04') {$value4 = $colresults->{'VALUE_NUM'}};
if ($hour == '05') {$value5 = $colresults->{'VALUE_NUM'}};
if ($hour == '06') {$value6 = $colresults->{'VALUE_NUM'}};
if ($hour == '07') {$value7 = $colresults->{'VALUE_NUM'}};
if ($hour == '08') {$value8 = $colresults->{'VALUE_NUM'}};
if ($hour == '09') {$value9 = $colresults->{'VALUE_NUM'}};
if ($hour == '10') {$value10 = $colresults->{'VALUE_NUM'}};
if ($hour == '11') {$value11 = $colresults->{'VALUE_NUM'}};
if ($hour == '12') {$value12 = $colresults->{'VALUE_NUM'}};
if ($hour == '13') {$value13 = $colresults->{'VALUE_NUM'}};
if ($hour == '14') {$value14 = $colresults->{'VALUE_NUM'}};
if ($hour == '15') {$value15 = $colresults->{'VALUE_NUM'}};
if ($hour == '16') {$value16 = $colresults->{'VALUE_NUM'}};
if ($hour == '17') {$value17 = $colresults->{'VALUE_NUM'}};
if ($hour == '18') {$value18 = $colresults->{'VALUE_NUM'}};
if ($hour == '19') {$value19 = $colresults->{'VALUE_NUM'}};
if ($hour == '20') {$value20 = $colresults->{'VALUE_NUM'}};
if ($hour == '21') {$value21 = $colresults->{'VALUE_NUM'}};
if ($hour == '22') {$value22 = $colresults->{'VALUE_NUM'}};
if ($hour == '23') {$value23 = $colresults->{'VALUE_NUM'}};
if ($d_name ne $colresults->{'DNAME'}) {
unless ($first) {
push @result, {
N => $n_name,
C => $c_name,
D => $d_name,
TIME0 => get_temp($value0),
TIME1 => get_temp($value1),
TIME2 => get_temp($value2),
TIME3 => get_temp($value3),
TIME4 => get_temp($value4),
TIME5 => get_temp($value5),
TIME6 => get_temp($value6),
TIME7 => get_temp($value7),
TIME8 => get_temp($value8),
TIME9 => get_temp($value9),
TIME10 => get_temp($value10),
TIME11 => get_temp($value11),
TIME12 => get_temp($value12),
TIME13 => get_temp($value13),
TIME14 => get_temp($value14),
TIME15 => get_temp($value15),
TIME16 => get_temp($value16),
TIME17 => get_temp($value17),
TIME18 => get_temp($value18),
TIME19 => get_temp($value19),
TIME20 => get_temp($value20),
TIME21 => get_temp($value21),
TIME22 => get_temp($value22),
TIME23 => get_temp($value23),
};
$value0 = undef;
$value1 = undef;
$value2 = undef;
$value3 = undef;
$value4 = undef;
$value5 = undef;
$value6 = undef;
$value7 = undef;
$value8 = undef;
$value9 = undef;
$value10 = undef;
$value11 = undef;
$value12 = undef;
$value13 = undef;
$value14 = undef;
$value15 = undef;
$value16 = undef;
$value17 = undef;
$value18 = undef;
$value19 = undef;
$value20 = undef;
$value21 = undef;
$value22 = undef;
$value23 = undef;
}
...
}
}
.... # продолжение не менее захватывающее