summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-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;