Beefy Boxes and Bandwidth Generously Provided by pair Networks
Your skill will accomplish
what the force of many cannot
 
PerlMonks  

(Ovid) Re: Looking for a simpler DBI solution.

by Ovid (Cardinal)
on Nov 01, 2001 at 23:42 UTC ( [id://122647]=note: print w/replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
    sub add_customer{
        my $sth = $dbh->prepare('INSERT INTO customers VALUES (?,?,?,?,?,?
    +,?,?,?,?,?,?)');
        die "Couldn't add customer" unless defined $sth;
        $sth->execute( @_ );
    }
    
  2. or download this
    sub add_customer {
        # $data_hash is a hashref representing the fields 
    ...
        chop $place_holders; # remove trailing comma
        return ( $fields, \@values, $place_holders );
    }
    

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others admiring the Monastery: (5)
As of 2024-03-28 12:18 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found