Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl: the Markov chain saw
 
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 romping around the Monastery: (6)
As of 2022-10-07 10:32 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    My preferred way to holiday/vacation is:











    Results (29 votes). Check out past polls.

    Notices?