From 7988b5ec83d2bffa83c6263835e5e9d7f375214f Mon Sep 17 00:00:00 2001 From: tetragon Date: Wed, 5 Sep 2007 18:17:13 +0000 Subject: 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 --- LedgerSMB/PE.pm | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) (limited to 'LedgerSMB') 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; -- cgit v1.2.3