Beefy Boxes and Bandwidth Generously Provided by pair Networks
Think about Loose Coupling
 
PerlMonks  

Re: DBI sudden exit on MySQL insert

by mreece (Friar)
on Apr 19, 2007 at 16:54 UTC ( [id://610990]=note: print w/replies, xml ) Need Help??


in reply to DBI sudden exit on MySQL insert

i can't answer your question, but i recommend you check for errors from prepare as well. (one possibility is that one of your keys is not a column of $table, but i would expect to see an error trying to call execute on an undefined value.)
my $sth = $dbh->prepare($sqlstatement) or die "cannot prepare: $DBI::errstr";
unrelated, but you can also simplify the top part of your function a bit:
my @values = values %$data; my $keylist = join ',', keys %$data; my $qlist = join ',', ('?') x @values;

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others drinking their drinks and smoking their pipes about the Monastery: (2)
As of 2024-04-20 03:30 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found