Help for this page

Select Code to Download


  1. or download this
    my @values = ( 'SomeValue', 5 );
    my $dbh= DBI->connect( $DSN, $user, $pass );
    my $SQL = "SELECT * FROM mytable WHERE field1=? LIMIT ?";
    my $sth = $dbh->prepare($SQL);
    $sth->execute( @values );
    
  2. or download this
    $sth->execute( 'SomeValue', 42 );