Thread C - String Operation (13 answers)
Opened by RPerl at 2007-10-22 15:47

bloonix
 2007-10-22 17:41
#101193 #101193
User since
2005-12-17
1615 Artikel
HausmeisterIn
[Homepage]
user image
wie wäre es mit DBI?

ungetestet:
Code: (dl )
1
2
3
4
5
6
7
foreach my $x (@array) {
my @cols = split /;/, $x;
my $sth = $dbh->prepare("insert into table (a,b,c,d) values (?,?,?,?)")
or die $dbh->errstr;
$sth->execute(@cols) or die $sth->errstr;
$sth->finish or die $sth->errstr;
}


das was du da vor hast ist unschön!
What is a good module? That's hard to say.
What is good code? That's also hard to say.
One man's Thing of Beauty is another's man's Evil Hack.

View full thread C - String Operation