2 # Test reporting program
7 use CGI::Carp qw(fatalsToBrowser);
10 $db_name = "tarificador";
11 $db_user = "tarificador";
12 $db_passwd = "n3ur0d3s4rr0ll008";
18 #my $sql = param('date');
19 #my $sql = "SELECT * from llamada where fecha_hora = day('4/3/2008')";
21 my $sql = param('query');
24 my $sth = $dbh->prepare("$sql");
35 while (my $hash = $sth->fetchrow_hashref)
38 "$hash->{id},$hash->{fecha_hora},$hash->{origen},$hash->{destino}<br/>";
39 print map{ "$_ "} values %$hash;
50 my $dbh = DBI->connect("dbi:mysql:dbname=$db_name"
51 , "$db_user", "$db_passwd")
52 or die "ERROR: Cannot connect to DB: $DBI::errstr!\n";