sub print_overall_summary { my $str = shift; $DBH = &connect or die "Cannot connect to the sql server \n"; $DBH->do("USE $str;"); my $stmt="select distinct * from summary order by time desc ;"; ; my $sth = $DBH->prepare( $stmt ); $sth->execute() or print "Could not in7sert_overall_summarydata"; print ""; }