Help for this page

Select Code to Download


  1. or download this
    my @param = <array of values to pass TO database>;
    my $sql = <some SQL with placeholders = ? to take values>;
    my $array_ref = $dbh->selectall_arrayref($sql,undef,@param);
    
  2. or download this
    my $dbh = <create database handle>;
    my $sth = $dbh->prepare("select * from table where col1=? and col2=?")
    +;
    ...
    @param = ("test2a","test2b);
    $array_ref = $sth->selectall_arrayref($sth,undef,@param);
    ...