Beefy Boxes and Bandwidth Generously Provided by pair Networks
laziness, impatience, and hubris
 
PerlMonks  

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

by Ovid (Cardinal)
on Nov 01, 2001 at 23:42 UTC ( #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
Node Status?
node history
Node Type: note [id://122647]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others contemplating the Monastery: (3)
As of 2021-05-10 07:48 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    Perl 7 will be out ...





    Results (105 votes). Check out past polls.

    Notices?