diff options
author | tetragon <tetragon@4979c152-3d1c-0410-bac9-87ea11338e46> | 2006-11-29 20:18:49 +0000 |
---|---|---|
committer | tetragon <tetragon@4979c152-3d1c-0410-bac9-87ea11338e46> | 2006-11-29 20:18:49 +0000 |
commit | 7de9d38661b0ff22dc8e37dd52b01b9e665f22e8 (patch) | |
tree | 51d7cfb9e359afd7251aac527ed8b78960a1dae8 | |
parent | 0dc37dc19e55aa4101017532ca02e0f43496d783 (diff) |
Converting some selectrow_array calls to fetchrow_array
git-svn-id: https://ledger-smb.svn.sourceforge.net/svnroot/ledger-smb/branches/1.2@704 4979c152-3d1c-0410-bac9-87ea11338e46
-rwxr-xr-x | LedgerSMB/AM.pm | 4 | ||||
-rwxr-xr-x | LedgerSMB/CP.pm | 4 | ||||
-rwxr-xr-x | LedgerSMB/CT.pm | 2 | ||||
-rwxr-xr-x | LedgerSMB/IS.pm | 2 |
4 files changed, 6 insertions, 6 deletions
diff --git a/LedgerSMB/AM.pm b/LedgerSMB/AM.pm index 91df2123..15558597 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 { diff --git a/LedgerSMB/CP.pm b/LedgerSMB/CP.pm index b5f0df2d..33d47bcf 100755 --- a/LedgerSMB/CP.pm +++ b/LedgerSMB/CP.pm @@ -406,7 +406,7 @@ sub post_payment { my $sth = $dbh->prepare($query); $sth->execute($form->{"id_$i"}); - my ($id) = $dbh->selectrow_array($query); + my ($id) = $sth->fetchrow_array; $amount = $form->round_amount( @@ -671,7 +671,7 @@ sub post_payments { $sth = $sbh->prepare($query); $sth->execute($form->{currency}, $form->{"id_$i"}) || $form->dberror($query, 'CP.pm', 671); - my ($exchangerate) = $dbh->selectrow_array($query); + my ($exchangerate) = $sth->fetchrow_array; $exchangerate ||= 1; diff --git a/LedgerSMB/CT.pm b/LedgerSMB/CT.pm index 421444b7..62cc45ae 100755 --- a/LedgerSMB/CT.pm +++ b/LedgerSMB/CT.pm @@ -427,7 +427,7 @@ sub save_vendor { $sth = $dbh->prepare($query); $sth->execute($form->{id}) || $form->dberror($query); - if (! $dbh->selectrow_array($query)) { + if (! $sth->fetchrow_array) { $query = qq|INSERT INTO vendor (id) VALUES (?)|; diff --git a/LedgerSMB/IS.pm b/LedgerSMB/IS.pm index c14bc920..2796d5ba 100755 --- a/LedgerSMB/IS.pm +++ b/LedgerSMB/IS.pm @@ -840,7 +840,7 @@ sub post_invoice { $sth = $dbh->prepare($query); $sth->execute($form->{id}); - if ($dbh->selectrow_array($query)) { + if ($sth->fetchrow_array) { &reverse_invoice($dbh, $form); } else { $query = qq|INSERT INTO ar (id) VALUES (?)|; |