Hi all,
I am looking for a "fetch" function to fetch "n" number of records at a time
in Perl DBI !
"fetchrow_hashref" fetches one row at a time whereas "fetchall_hashref"
fetches all the rows at a time.
The requirement is to get 100 records at a time (in array or hash) before
printing it into the output file.
I don't want to use following style ;-
my $count=0;
while ($href1 = $sth->fetchrow_hashref())
{
my @arr1 = ();
$count = $count + 1;
%arr1 = %$href1;
if ($count == 100)
{
# print to the output file
print PTR %arr1;
}
}
Thanks & Regards,
Amit Saxena