----- Original Message -----
From: "Philip Mak" <[EMAIL PROTECTED]>
> > > $rows = $dbh->selectall_hashref("SELECT ...");
> > > for my $row (@{$rows}) {
> > > do something with $row
> > > }
> What's the efficient way of doing this? $sth->fetchrow_hashref?
A traditional for loop.
for ( my $i = 0; $i <= $#$rows; $i++ ) {
do something with %$row->[$i]
}
-Mike
- RE: Shorthand for $dbh->prepare and $sth->exec... Marcotullio, Angelo
- RE: Shorthand for $dbh->prepare and $sth->exec... Orlando Andico
- Re: Shorthand for $dbh->prepare and $sth->... Tommy Wareing
- Re: Shorthand for $dbh->prepare and $sth->... Michael A. Chase
- Re: Shorthand for $dbh->prepare and $sth->... Tim Bunce
- RE: Shorthand for $dbh->prepare and $sth->exec... Michael Peppler
- RE: Shorthand for $dbh->prepare and $sth->exec... Marcotullio, Angelo
- Re: RE: Shorthand for $dbh->prepare and $sth->... Ali Zaidi
- Re: Shorthand for $dbh->prepare and $sth->exec... Michael A Mayo
- Re: Shorthand for $dbh->prepare and $sth->exec... Philip Mak
- RE: Shorthand for $dbh->prepare and $sth->... Michael A Mayo
- RE: Shorthand for $dbh->prepare and $sth->exec... Sterin, Ilya
- RE: RE: Shorthand for $dbh->prepare and $sth->... Sterin, Ilya
- RE: Shorthand for $dbh->prepare and $sth->exec... Sterin, Ilya
- RE: RE: Shorthand for $dbh->prepare and $sth->... Marcotullio, Angelo
- Re: Shorthand for $dbh->prepare and $sth->exec... Tim Bunce
- Re: Shorthand for $dbh->prepare and $sth->... Michael Peppler
