Beefy Boxes and Bandwidth Generously Provided by pair Networks
There's more than one way to do things
 
PerlMonks  

Re: What are placeholders in DBI, and why would I want to use them?

by btrott (Parson)
on Apr 14, 2000 at 01:59 UTC ( #7556=note: print w/replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
    my $sth = $dbh->prepare(<<SQL);
    insert into my_table (id, name) values ('15', 'Foo')
    SQL
    
  2. or download this
    my $sth = $dbh->prepare(<<SQL);
    insert into my_table (id, name) values (?, ?)
    SQL
    
  3. or download this
    $sth->execute('15', 'Foo');
    
  4. or download this
    my $sth = $dbh->prepare_cached(<<SQL);
    insert into my_table (id, name) values (?, ?)
    SQL
    $sth->execute('15', 'Foo');
    

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others meditating upon the Monastery: (2)
As of 2022-05-28 07:58 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    Do you prefer to work remotely?



    Results (98 votes). Check out past polls.

    Notices?