uh... don't you mean?
print $rec->[0 .. 4]; # element 0 through 4

or
print $rec->[0,4]; ## elements 0 and 4


-----Original Message-----
From: Derrick Wippler [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, March 06, 2002 2:08 PM
To: [EMAIL PROTECTED]
Subject: Good God. I'm going to pull my hair out.


Can anyone tell me why " print $rec->[4] " prints
but print "$recs[0]->[4] does not print a thing ?

I've confimed the data, the first row in the fourth column is an "F"
$rec->[4] prints it, but $recs[0]->[4] does not !!!!!!! ARG
!!!!@#@!#!!!@@!!@!!
PS: I'm using DBI, my DBI object is $db

    my @recs;
     my $sql = shift;
     my $st = $db->prepare($sql);
     my $rc = $st->execute(@_);
     my $rec;

     while ($rec = $st->fetchrow_arrayref)
     {
         print @$rec,"\n";
         print "|$rec->[4]|\n";
         push @recs, $rec;
     }

     $st->finish;
    print " Ref: $recs->[0][4]\n";


-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

----------------------------------------------------------------------------
--------------------
The views and opinions expressed in this email message are the sender's
own, and do not necessarily represent the views and opinions of Summit
Systems Inc.


-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to