Beefy Boxes and Bandwidth Generously Provided by pair Networks
good chemistry is complicated,
and a little bit messy -LW
 
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 all is quiet...

How do I use this? | Other CB clients
Other Users?
Others cooling their heels in the Monastery: (3)
As of 2017-07-23 23:54 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    I came, I saw, I ...
























    Results (347 votes). Check out past polls.