diff options
author | tetragon <tetragon@4979c152-3d1c-0410-bac9-87ea11338e46> | 2006-11-16 00:18:40 +0000 |
---|---|---|
committer | tetragon <tetragon@4979c152-3d1c-0410-bac9-87ea11338e46> | 2006-11-16 00:18:40 +0000 |
commit | ef1ab215024252b02794e2138571021528da4a80 (patch) | |
tree | ff323cc5f984fee6fb21ffcbc43e6f4c5850553d | |
parent | be8275c83c27b7776c4dc30968242e12bb965c11 (diff) |
Fix duplicate key violation in saving a customer
git-svn-id: https://ledger-smb.svn.sourceforge.net/svnroot/ledger-smb/branches/1.2@626 4979c152-3d1c-0410-bac9-87ea11338e46
-rwxr-xr-x | LedgerSMB/CT.pm | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/LedgerSMB/CT.pm b/LedgerSMB/CT.pm index 19c0411d..421444b7 100755 --- a/LedgerSMB/CT.pm +++ b/LedgerSMB/CT.pm @@ -250,7 +250,7 @@ sub save_customer { $sth = $dbh->prepare($query); $sth->execute($form->{id}) || $form->dberror($query); - if (! $dbh->selectrow_array($query)) { + if (! $sth->fetchrow_array) { $query = qq| INSERT INTO customer (id) VALUES (?)|; |