|< 1 2 >| | 11 Einträge, 2 Seiten |
1
2
3
4
5
6
7
8
9
10
use DBI;
my $dbh = DBI->connect("DBI:CSV:f_dir=C:/;csv_sep_char=\t")
or die $DBI::errstr;
$dbh->{'csv_tables'}->{'info'} = { 'file' => 'info.csv'};
my $sth = $dbh->prepare("SELECT PartID FROM info");
$sth->execute();
while(my $test = $sth->fetchrow_hashref){
print "$test \n";
1
2
3
4
5
6
7
8
9
10
11
12
use DBI;
use Data::Dumper;
my $dbh = DBI->connect("DBI:CSV:f_dir=C:/;csv_sep_char=\t")
or die $DBI::errstr;
$dbh->{'csv_tables'}->{'info'} = { 'file' => 'info.csv'};
my $sth = $dbh->prepare("SELECT PartID FROM info");
$sth->execute();
while(my $test = $sth->fetchrow_hashref){
print Dumper($test);
}
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
use DBI;
use Data::Dumper;
my $dbh = DBI->connect("DBI:CSV:f_dir=C:/;csv_sep_char=\t")
or die $DBI::errstr;
$dbh->{'csv_tables'}->{'info'} = { 'file' => 'info.csv'};
my $sth = $dbh->prepare("SELECT PartID FROM info");
$sth->execute();
my %hash;
while(my $test = $sth->fetchrow_hashref){
$hash{$test->{PartID}} = 1;
}
print Dumper(\%hash);
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
use DBI;
use Data::Dumper;
my $dbh = DBI->connect("DBI:CSV:f_dir=C:/;csv_sep_char=\t")
or die $DBI::errstr;
$dbh->{'csv_tables'}->{'info'} = { 'file' => 'info.csv'};
my $sth = $dbh->prepare("SELECT PartID FROM info");
$sth->execute();
my %hash;
while(my $test = $sth->fetchrow_hashref){
unless($hash{$test->{PartID}}){
$hash{$test->{PartID}} = 1;
}
else{
print "Schon vorhanden: ",$test->{PartID},"\n";
}
}
print Dumper(\%hash);
|< 1 2 >| | 11 Einträge, 2 Seiten |