I'm using DBI to read and write MySQL:
[
metacpan.org...]
Most of my scripts are running fine, but I have one that's throwing an error that doesn't make sense.
This is the command:
$sth = $dbh->prepare(qq~
REPLACE INTO $whichtable
(username, image, title, city, gender, age, wanting_gender, wanting_age_min, wanting_age_max, zodiac, occupation, attributes, hair, eyes, height, weight, body, education, income, job_importance, alcohol, smoking, wouldbe, adventurous, personality, race, religion, religious_importance, marital, children, description)
VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)
~) or die "prepare statement failed: $dbh->errstr()";
$sth->execute($contents{'username'}, $contents{'pic'}, $contents{'ad_title'}, $contents{'city'}, $contents{'gender'}, $contents{'age'}, $contents{'looking_for'}, $contents{'wanting_age_min'}, $contents{'wanting_age_max'}, $contents{'zodiac'}, $contents{'occupation'}, $contents{'attributes'}, $contents{'hair'}, $contents{'eyes'}, $contents{'height'}, $contents{'weight'}, $contents{'body'}, $contents{'education'}, $contents{'income'}, $contents{'job_importance'}, $contents{'alcohol'}, $contents{'smoking'}, $contents{'wouldbe'}, $contents{'adventurous'}, $contents{'personality'}, $contents{'race'}, $contents{'religion'}, $contents{'religious_importance'}, $contents{'marital'}, $contents{'children'}, $contents{'description'}) or die "execution failed: $dbh->errstr()";
It's dying on the execute() statement, but this is all it says:
execution failed: DBI::db=HASH(0x24b3810)->errstr() at /home/foo/cgi-bin/bar.cgi line 379.
Nothing shows up in the error log.
Any thoughts?