Help for this page

Select Code to Download


  1. or download this
     my $name = $cgi->param("name"); 
    
    ...
    my $sth = $dbh->prepare( "select * from my_db where name like ?" ) or 
    +die "DBI prepare: $DBI::errstr";
    
    $sth->execute( %name% ) or die "Couldn't execute statement: $DBI::errs
    +tr";
    
  2. or download this
    $sth->execute( $name ) or die "Couldn't execute statement: $DBI::errst
    +r";
    
  3. or download this
    my $sth = $dbh->prepare("
        SELECT blah FROM blah WHERE blah LIKE ?
    ");
    $sth->execute('%foo%');