Help for this page

Select Code to Download


  1. or download this
    # 1
    
    ...
        my $sql = sprintf("UPDATE mytable SET %s = ? WHERE id = ?", $p)
        $dbh->do($sql, undef, param($p), $id);
    }
    
  2. or download this
    # 2
    
    ...
    
    # And then hit the database with that UPDATE statement just once.
    $dbh->do($sql, undef, bind);