Help for this page

Select Code to Download


  1. or download this
    my $sth = $dbh->prepare('
       SELECT characters.first, characters.last
    ...
    while (my $row = $sth->fetchrow_hashref) {
       print "$row->{first} $row->{last}\n";
    }
    
  2. or download this
    use MyDBI::people;
    
    my ($person)   = MyDBI::people->search(first=>'John', last=>'Smith');
    my @characters = $person->characters;