From 37e939f8e6882bf6588c4903855fae905b35634f Mon Sep 17 00:00:00 2001 From: einhverfr Date: Thu, 21 Jun 2007 19:00:30 +0000 Subject: Fixed error updating custom fields git-svn-id: https://ledger-smb.svn.sourceforge.net/svnroot/ledger-smb/trunk@1292 4979c152-3d1c-0410-bac9-87ea11338e46 --- LedgerSMB/DBObject.pm | 3 ++- LedgerSMB/Form.pm | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/LedgerSMB/DBObject.pm b/LedgerSMB/DBObject.pm index 6d298ecb..f3094dff 100644 --- a/LedgerSMB/DBObject.pm +++ b/LedgerSMB/DBObject.pm @@ -1,4 +1,5 @@ + =head1 NAME LedgerSMB::DBObject - LedgerSMB class for building objects from db relations @@ -158,7 +159,7 @@ sub run_custom_queries { if ( $query_type eq 'UPDATE' ) { $query = "DELETE FROM $_ WHERE row_id = ?"; my $sth = $dbh->prepare($query); - $sth->execute->( $self->{ "id" . "$linenum" } ) + $sth->execute( $self->{ "id" . "$linenum" } ) || $self->dberror($query); } elsif ( $query_type eq 'INSERT' ) { diff --git a/LedgerSMB/Form.pm b/LedgerSMB/Form.pm index 206669c6..09278953 100644 --- a/LedgerSMB/Form.pm +++ b/LedgerSMB/Form.pm @@ -1514,7 +1514,7 @@ sub run_custom_queries { if ( $query_type eq 'UPDATE' ) { $query = "DELETE FROM $_ WHERE row_id = ?"; my $sth = $dbh->prepare($query); - $sth->execute->( $self->{ "id" . "$linenum" } ) + $sth->execute( $self->{ "id" . "$linenum" } ) || $self->dberror($query); } elsif ( $query_type eq 'INSERT' ) { -- cgit v1.2.3