|< 1 ... 7 8 9 10 11 12 >| | 118 Einträge, 12 Seiten |
Quote
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
#! f:/Perl/bin/perl
use strict;
use warnings;
use DBI;
use FindBin ();
use CGI qw(:standard);
use CGI::Carp qw(fatalsToBrowser);
use HTML::Table;
my $dbh = DBI->connect('DBI:CSV:f_dir='.$FindBin::Bin.';csv_sep_char=\;'.";csv_eol=\n") or die $DBI::errstr;
my $stmt = "SELECT * FROM Kunde";
my $sth = $dbh->prepare($stmt) or die $dbh->errstr();
$sth->execute() or die $dbh->errstr();
print header();
print start_html();
my $table2 = new HTML::Table;
$table2->addRow('DHL','K_N','Hellmann');
while(my @row = $sth->fetchrow_array()){
$table2->addRow(@row);
}
$dbh->disconnect;
$table2->print;
print qq~<a href='Pie.cgi'>Zum Tortendiagramm</a>~;
QuoteAber das kann ich nut vermuten, selbst habe ich beides noch nie benutzt.
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
#! f:/Perl/bin/perl
use strict;
use warnings;
use DBI;
use FindBin ();
use CGI qw(:standard);
use CGI::Carp qw(fatalsToBrowser);
use HTML::Table;
my $dbh = DBI->connect('DBI:CSV:f_dir='.$FindBin::Bin.';csv_sep_char=\;'.";csv_eol=\n") or die $DBI::errstr;
my $stmt = "SELECT * FROM Kunde";
my $sth = $dbh->prepare($stmt) or die $dbh->errstr();
$sth->execute() or die $dbh->errstr();
print header();
print start_html();
my $table2 = new HTML::Table;
$table2->addRow('DHL','K_N','Hellmann');
while(my @row = $sth->fetchrow_array()){
$table2->addRow(@row);
}
$dbh->disconnect;
$table2->print;
print qq~<a href='Pie.cgi'>Zum Tortendiagramm</a>~;
Can't locate object method "connect" via package "DBD" at F:/Apache2/cgi-bin/daba7.cgi line 11.
my $dbh = DBD->connect('DBD:CSV:f_dir='.$FindBin::Bin.';csv_sep_char=\;'.";csv_eol=\n") or die $DBI::errstr;
|< 1 ... 7 8 9 10 11 12 >| | 118 Einträge, 12 Seiten |