Preparing statement: select
clli, traffic_date, count(distinct(traffic_hour))
from
gvc_traffic30
where
traffic_date in (?)
and
clli in (?,?)
and
traffic_hour in (?)
and
traffic_type = 'N'
group by
clli, traffic_date, traffic_hour
running with args : 01-Jul-2002 switch1 switch2 10
####
traffic_est_report.pl -c switch1,switch2 -d 01-Jul-2002 -H 10
##
##
execute called with 1 bind variables when 4 are needed at traffic_est_report.pl line 467.
##
##
sub get_data {
my ($statement) = shift;
my ($clli_ref_args) = shift;
my ($hour_ref_args) = shift;
my ($date_ref_args) = shift;
my ($start_date, $end_date);
my (@results,@args);
push(@args,@$date_ref_args) if ( $date_ref_args );
push(@args,@$clli_ref_args) if ( $clli_ref_args );
push(@args,@$hour_ref_args) if ( $hour_ref_args );
print "Preparing statement: $statement\n";
print "running with args : @args\n\n";
$STH = $DBH->prepare($statement)
or warn("Unable to prep statement.\n");
$STH->execute(@args);
while ( my @arr = $STH->fetchrow_array() ) {
print @arr,"\n";
push(@results,@arr);
}
$STH->finish();
print "@results\n";
return(1);
}