Help for this page

Select Code to Download


  1. or download this
    select name, address, phonehome, phonework from addressbook;
    
  2. or download this
    select name from addressbook;
    
  3. or download this
    $info = {
                 name => "fred",
    };
    
  4. or download this
    my @case;
    while( my $info = $sth->fetchrow_hashref) {
          push @case, $info->{name};
    }
    print "@case\n";      # prints built up @case.
    
  5. or download this
    my $names = $dbh->selectcol_arrayref(
                   "select name from addressbook where name like ?",
    ...
    
    my @case = @$names;   # If you'd rather deal with an array
    print "@case\n";      # prints out ALL of the names selected.