Beefy Boxes and Bandwidth Generously Provided by pair Networks
"be consistent"
 
PerlMonks  

Re: Update mysql row with a hash

by tstock (Curate)
on Nov 04, 2017 at 03:59 UTC ( [id://1202738]=note: print w/replies, xml ) Need Help??


in reply to Update mysql row with a hash

my ($id) = delete $data_to_insert{id}; my $sql = "UPDATE some_table SET " . join( '=?,', keys %data_to_insert ) . '=? ' . 'WHERE id=?'; $dbh->do( $stmt, undef, values %data_to_insert, $id );

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others cooling their heels in the Monastery: (4)
As of 2024-03-29 10:42 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found