how to fetch all records

From: Tiffany Thang (tiffanythang_at_gmail.com)
Date: 02/25/05


Date: Fri, 25 Feb 2005 12:22:45 -0500
To: dbi-users@perl.org

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



Relevant Pages

  • Re: Finding out max retrievable records via DB Toolbox?
    ... >> each go by specifying a row limit for my cursor, ... I'm using a loop as follows to do this: ... this presupposes that I know the maximum number of ... > even when I vary the number of rows I'm fetching. ...
    (comp.soft-sys.matlab)
  • Re: Finding out max retrievable records via DB Toolbox?
    ... > each go by specifying a row limit for my cursor, ... I'm using a loop as follows to do this: ... this presupposes that I know the maximum number of rows to ... even when I vary the number of rows I'm fetching. ...
    (comp.soft-sys.matlab)
  • Re: Arm7 or Freescale Coldfire?
    ... fetching the opcodes but continues to test for the loop termination ... and send em to you for free if you didnt know already). ... The CPU stops fetching, does just ...
    (comp.arch.embedded)
  • Re: Finding out max retrievable records via DB Toolbox?
    ... with a specified row limit, I was in fact varying my row limit to an ... a constant fetching number (like always 50,000 rows at a time or ... Keeping the loop iteration and the rowlimit variables separate, ... this presupposes that I know the maximum number of ...
    (comp.soft-sys.matlab)
  • Re: Reverse search in a singly-linked list
    ... Use a for loop with a function that can retrieve an element from the ... It would be much faster to convert the list to an array first ... Mike ...
    (comp.lang.c)