Help for this page

Select Code to Download


  1. or download this
    my $sql = "select name,address,phone,email from my table where name='m
    +ary'";
    my $sth=$dbh->prepare($sql) or die "Couldn't prepare statement handle:
    + ".$dbh->errstr();
    ...
    }
    $sth->finish();
    
  2. or download this
       push(@some_array, join(' ', @row));
    
  3. or download this
    my $sql="select name,address,phone,email from my table where name=?";
    my $sth=$dbh->prepare($sql) or die "Couldn't prepare statement handle:
    + ".$dbh->errstr();
    my $count=$sth->execute('mary') or die "Couldn't execute statement:".$
    +dbh->errstr();