The simplest is $dbh->selectrow_arrayref(). It's documented in the DBI man page.
-Will -----Original Message----- From: Tiffany Thang [mailto:[EMAIL PROTECTED] Sent: Friday 25 February 2005 12:23 To: dbi-users@perl.org Subject: how to fetch all records 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? thanks. tiff - - - - - - - Appended by Scientific-Atlanta, Inc. - - - - - - - This e-mail and any attachments may contain information which is confidential, proprietary, privileged or otherwise protected by law. The information is solely intended for the named addressee (or a person responsible for delivering it to the addressee). If you are not the intended recipient of this message, you are not authorized to read, print, retain, copy or disseminate this message or any part of it. If you have received this e-mail in error, please notify the sender immediately by return e-mail and delete it from your computer.