Thread DBI und MS-Access Verbesserungsmöglichkeiten (4 answers)
Opened by AndreasM at 2006-07-10 16:09

Strat
 2006-07-12 14:54
#34506 #34506
User since
2003-08-04
5246 Artikel
ModeratorIn
[Homepage] [default_avatar]
Code: (dl )
while ( @row_ary = $sth->fetchrow_array ) {

durch:
Code: (dl )
while( my $dataHRef = $sth->fetchrow_hashref() ) {

dann hast du die "Zeile" in einer Hashreferenz, deren Keys die Feldnamen sind, z.B.
Code: (dl )
1
2
3
4
5
while( my $dataHRef = $sth->fetchrow_hashref() ) {
foreach my $fieldname (sort keys %$dataHRef) {
print "$fieldname => '$dataHRef->{$fieldname}'\n";
} # foreach
} # while
perl -le "s::*erlco'unaty.'.dk':e,y;*kn:ai;penmic;;print"
http://www.fabiani.net/

View full thread DBI und MS-Access Verbesserungsmöglichkeiten