added extra debug to sql fatal errors

This commit is contained in:
JT Smith 2004-09-13 20:09:46 +00:00
parent db8e8e99ac
commit e84f4bf828
2 changed files with 4 additions and 2 deletions

View file

@ -306,7 +306,8 @@ A list of values to be used in the placeholders defined in the prepared statemen
sub execute {
my $self = shift;
$self->{_sth}->execute(@_) or WebGUI::ErrorHandler::fatalError("Couldn't execute prepared statement: ". DBI->errstr);
my $sql = shift;
$self->{_sth}->execute or WebGUI::ErrorHandler::fatalError("Couldn't execute prepared statement: $sql Root cause: ". DBI->errstr);
}
@ -734,7 +735,7 @@ sub read {
my $sql = shift;
my $dbh = shift;
my $sth = WebGUI::SQL->prepare($sql, $dbh);
$sth->execute;
$sth->execute($sql);
return $sth;
}