fetchrow_hashref Question

From: Gohaku (gohaku_at_earthlink.net)
Date: 12/23/03

  • Next message: Paul Boutros: "RE: fetchrow_hashref Question"
    Date: Tue, 23 Dec 2003 12:28:46 -0500
    To: dbi-users@perl.org
    
    

    Hi everyone,
    I just found out about fetchrow_hashref after using fetchrow_array for
    quite a while now. I have some questions about the following code:
    while ( my $row = $sth->fetchrow_hashref ) {
         print "New User:\n";
         foreach my $field ( sort keys %{ $row } ) {
             print "$field: $row->{ $field }\n";
         }
      }

    If I try to print $row{$field}, I don't see anything, why is that?
    Thanks in advance.

    -gohaku


  • Next message: Paul Boutros: "RE: fetchrow_hashref Question"