Leser: 2
7 Einträge, 1 Seite |
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
my $dbh = DBI->connect("dbi:mysql:$dbank:localhost","$dbuser","$dbpass");
$sth = $dbh->prepare( "SELECT * FROM $tabelledbsystem");
$sth->execute();
while (@row = $sth->fetchrow_array()) {
$mailid = $row[0];
$mailaddy = $row[7];
chomp($mailaddy);
$mailaddy =~ s!\n$!!;
open (PASS3,">>/kunden/cgiresource/dbsystem/data/repairdb");
print PASS3 "$mailid|$mailaddy\n";
close(PASS3);
}
my $rc = $dbh->disconnect; #schließen
1
2
3
4
5
6
7
8
9
10
11
12
13
open (DATEI,"</kunden/cgiresource/dbsystem/data/repairdb") || die "Fehler in $datei $!";
chomp(@datei = <DATEI>);
close (DATEI);
foreach $zeile (@datei)
{
($id,$mail) = split (/\|/, $zeile);
#$mail =~ s/\n//g;
my $dbh = DBI->connect("dbi:mysql:$dbank:localhost","$dbuser","$dbpass");
$sth = $dbh->prepare( "UPDATE dbsystem2 SET mail=\"$mail\" WHERE id='$id' LIMIT 1");
$sth->execute();
my $rc = $dbh->disconnect; #schließen
}
7 Einträge, 1 Seite |