summaryrefslogtreecommitdiff
path: root/LedgerSMB/AM.pm
diff options
context:
space:
mode:
Diffstat (limited to 'LedgerSMB/AM.pm')
-rwxr-xr-xLedgerSMB/AM.pm4
1 files changed, 2 insertions, 2 deletions
diff --git a/LedgerSMB/AM.pm b/LedgerSMB/AM.pm
index 4ca04ac5..15ea3e33 100755
--- a/LedgerSMB/AM.pm
+++ b/LedgerSMB/AM.pm
@@ -233,7 +233,7 @@ sub delete_account {
$sth->execute($form->{id});
my ($rowcount) = $sth->fetchrow_array();
- if ($dbh->selectrow_array($query)) {
+ if ($rowcount) {
$form->error(
"Cannot delete accounts with associated transactions!"
);
@@ -345,7 +345,7 @@ sub get_gifi {
$sth = $dbh->prepare($query);
$sth->execute($form->{accno}) || $form->dberror($query);
- ($numrows) = $dbh->selectrow_array($query);
+ ($numrows) = $sth->fetchrow_array;
if (($numrows * 1) == 0){
$form->{orphaned} = 1;
} else {