List:General Discussion« Previous MessageNext Message »
From:Vivek Khera Date:October 28 1999 7:41pm
Subject:RE: PERL DBI Driver Speed
View as plain text  
>>>>> "DR" == Dan Ray <dan@stripped> writes:

DR> # get back all rows, using constants to index into @ary...

DR> while (@ary = $sth->fetchrow_array) {
DR> 	$name = $ary[NAME];
DR> 	$address = $ary[ADDRESS];
DR> 	$city = $ary[CITY];
DR> }

Or, for convenience,

while (my ($name,$address,$city) = $sth->fetchrow_array) {
      # do something!
}

no need to an extra @ary variable there...

-- 
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
Vivek Khera, Ph.D.                Khera Communications, Inc.
Internet: khera@stripped       Rockville, MD       +1-301-545-6996
PGP & MIME spoken here            http://www.kciLink.com/home/khera/
Thread
PERL DBI Driver SpeedTodd V. Rovito28 Oct
  • Re: PERL DBI Driver SpeedVivek Khera28 Oct
    • RE: PERL DBI Driver SpeedDan Ray28 Oct
      • RE: PERL DBI Driver SpeedVivek Khera28 Oct
        • RE: PERL DBI Driver Speedxcxsxvx28 Oct
  • Re: PERL DBI Driver Speedsasha28 Oct