Beefy Boxes and Bandwidth Generously Provided by pair Networks
The stupid question is the question not asked
 
PerlMonks  

Re (3): Perl DBI Insert row

by VSarkiss (Monsignor)
on Nov 26, 2003 at 17:32 UTC ( #310326=note: print w/ replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
    my $sthC = $dbh->prepare("insert TABLE (col1, col2, ...)
    values(?, ?, ?)")
        or die "Couldn't prepare: $DBI::errstr";
    $sthC->execute('value1', 'value2', ...)
        or die "Couldn't execute: $DBI::errstr";
    
  2. or download this
    my @values = qw(...);
    my $sql = q{
    insert
    ...
       or die "Couldn't prepare $sql: $DBI::errstr";
    $sth->execute(@values)
        or die "Couldn't execute $sql: $DBI::errstr";
    

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others meditating upon the Monastery: (16)
As of 2014-07-23 20:45 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    My favorite superfluous repetitious redundant duplicative phrase is:









    Results (152 votes), past polls