Beefy Boxes and Bandwidth Generously Provided by pair Networks
Pathologically Eclectic Rubbish Lister
 
PerlMonks  

Re (3): Perl DBI Insert row

by VSarkiss (Monsignor)
on Nov 26, 2003 at 17:32 UTC ( [id://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
Domain Nodelet?
Node Status?
node history
Node Type: note [id://310326]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others surveying the Monastery: (5)
As of 2024-04-19 06:52 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found