Beefy Boxes and Bandwidth Generously Provided by pair Networks
No such thing as a small change
 
PerlMonks  

Re: Replacing DBI->do()

by MidLifeXis (Monsignor)
on Apr 23, 2014 at 13:56 UTC ( [id://1083360]=note: print w/replies, xml ) Need Help??


in reply to Replacing DBI->do()

The documentation lists this format for using bind values:

$rv = $dbh->do($statement, \%attr, @bind_values);
I am surprised that your snippet even compiles or passes the SQL parser, but in any case, I don't think that you are doing what you think you are doing.

To expand on the synopsis example, do:

my $statement = q{INSERT INTO....}; my %attr = (); my @bind_values = ( 'NULL', $first, $last ); my $rv = $dbh->do( $statement, \%attr, @bind_values );
and see what happens.

--MidLifeXis

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others exploiting the Monastery: (2)
As of 2024-04-26 05:44 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found