Beefy Boxes and Bandwidth Generously Provided by pair Networks
Think about Loose Coupling
 
PerlMonks  

Re: DBI Deletes with placeholders

by olus (Curate)
on Feb 04, 2008 at 15:27 UTC ( #665981=note: print w/replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
    my $qry = "delete from my_table where id=?";
    my $sth = $dbh->prepare($qry);
    $sth->execute($value_to_delete) or die DBI->errstr;
    print "deleted rows = ".$sth->rows;
    $sth->finish;
    
  2. or download this
    my $qry = "delete from my_table where id=?";
    $dbh->do($qry, undef, $value_to_delete);
    

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://665981]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others browsing the Monastery: (4)
As of 2022-08-11 03:10 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found

    Notices?