Help for this page

Select Code to Download


  1. or download this
    my (@tables, %map);
    my $q = $dbh->prepare("show tables");
    ...
        }
        $q->finish;
    }
    
  2. or download this
    my $table_name = "CDR";
    my $sql = "select ".join ",", map { "sum($_)" } @{$map{$table_name}};
    $sql .= " from $table_name where Date = ? and Hour like ?";