in reply to DBI: insert fails without error
By way of update, I have also tried the following suggested method and no change is noted in the outcome of doing it this way vs. the original way.
The suggestion was to try first preparing a statement and then executing it rather than simply calling $dbh->do()...
Basically, still no luck.my($sql) = <<__SQL__; INSERT INTO comments ( photologid, name, email, comments, ipaddr, comment_date ) VALUES (?,?,?,?,?,NOW()) __SQL__ my($sth) = $dbh->prepare($sql) or do { cgi_error(qq{Couldn't add visitor comments. We're sorry!}); notify_admin(<<__ERR__) Problem adding visitor comments to photolog id "$plogid"! $DBI::errstr __ERR__ }; warn $DBI::errstr if $DBI::errstr; $sth->execute( $plogid, $name, $email, $comments, ( $ENV{'REMOTE_ADDR'} || '000.000.000.000' ) ) or do { cgi_error(qq{Couldn't add visitor comments. We're sorry!}); notify_admin(<<__ERR__) Problem adding visitor comments to photolog id "$plogid"! $DBI::errstr __ERR__ }; warn $DBI::errstr if $DBI::errstr; my($msgid) = $dbh->{'mysql_insertid'};
-- Tommy Butler, a.k.a. TOMMY
|
|---|