summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authortetragon <tetragon@4979c152-3d1c-0410-bac9-87ea11338e46>2007-09-05 18:17:13 +0000
committertetragon <tetragon@4979c152-3d1c-0410-bac9-87ea11338e46>2007-09-05 18:17:13 +0000
commit7988b5ec83d2bffa83c6263835e5e9d7f375214f (patch)
tree9191cbf09b96cea164623faaab6d5ebb66bdc04a
parent310f95f24c2a5b67a3cf716449f83c0c9c06cc3d (diff)
Adjusting save_partsgroup to better fit my terminal window.
git-svn-id: https://ledger-smb.svn.sourceforge.net/svnroot/ledger-smb/branches/1.2@1506 4979c152-3d1c-0410-bac9-87ea11338e46
-rwxr-xr-xLedgerSMB/PE.pm10
1 files changed, 6 insertions, 4 deletions
diff --git a/LedgerSMB/PE.pm b/LedgerSMB/PE.pm
index 6cd2d5cf..857d6844 100755
--- a/LedgerSMB/PE.pm
+++ b/LedgerSMB/PE.pm
@@ -1024,19 +1024,21 @@ sub save_partsgroup {
my ( $self, $myconfig, $form ) = @_;
my $dbh = $form->{dbh};
+ my @group = ($form->{partsgroup});
if ( $form->{id} ) {
$query = qq|
UPDATE partsgroup
- SET partsgroup = | . $dbh->quote( $form->{partsgroup} ) . qq|
- WHERE id = $form->{id}|;
+ SET partsgroup = ?
+ WHERE id = ?|;
+ push @group, $form->{id};
}
else {
$query = qq|
INSERT INTO partsgroup (partsgroup)
- VALUES (| . $dbh->quote( $form->{partsgroup} ) . qq|)|;
+ VALUES (?)|;
}
- $dbh->do($query) || $form->dberror($query);
+ $dbh->do($query, undef, @group) || $form->dberror($query);
$dbh->commit;