Help for this page

Select Code to Download


  1. or download this
    my %sth = map { $_ => $dbh->prepare ("select * from foo where $_ = ?")
    + } qw( coln1 coln2 coln3 ); # Note the unquoted ?
    
    $sth{coln1}->execute ($coln1_val); # query for coln1 executed with ? r
    +eplaced with $coln2_val