-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1


On Feb 25, 2005, at 9:22 AM, Tiffany Thang wrote:

Is there another way of fetching all table records in one statement
without going through a loop?

What I have now is as follows:
while (@eachrec=$sth->fetchrow_array) {
        do whatever;
}

I want to retrieve all the records into an array first and process it
later on. What would be the best way of doing it?

from perldoc DBI...

         $ary_ref  = $dbh->selectall_arrayref($statement);

Looks like selectall_arrayref is your cup of tea.

- -- - -- Tom Mornini

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.4 (Darwin)

iD8DBQFCH2BYzaKkuvKwKvcRApIcAKCBpOPUl6erXlmwnB5irQ9lK3eTbgCfafSw
D62q6T95L+/udISb63eJo8s=
=bOUZ
-----END PGP SIGNATURE-----



Reply via email to