Help for this page

Select Code to Download


  1. or download this
    $sth = $dbh->prepare("SELECT foo, bar FROM table WHERE baz=?");
    
    $sth->execute( $baz );
    ...
    while ( @row = $sth->fetchrow_array ) {
        print "@row\n";
    }
    
  2. or download this
    my $LIMIT = 30;
    
    my $sth = $dbh->prepare("SELECT foo, bar FROM table WHERE baz=?");
    ...
    }
    
    #do stuff with @rows