diff options
author | einhverfr <einhverfr@4979c152-3d1c-0410-bac9-87ea11338e46> | 2007-06-21 19:00:30 +0000 |
---|---|---|
committer | einhverfr <einhverfr@4979c152-3d1c-0410-bac9-87ea11338e46> | 2007-06-21 19:00:30 +0000 |
commit | 37e939f8e6882bf6588c4903855fae905b35634f (patch) | |
tree | 238e46fd3c9ab8a6e520ba94796db2bef2aef997 | |
parent | c91a0fe516d246a35a9b4976b99da611c5d1b662 (diff) |
Fixed error updating custom fields
git-svn-id: https://ledger-smb.svn.sourceforge.net/svnroot/ledger-smb/trunk@1292 4979c152-3d1c-0410-bac9-87ea11338e46
-rw-r--r-- | LedgerSMB/DBObject.pm | 3 | ||||
-rw-r--r-- | 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' ) { |