summaryrefslogtreecommitdiff
path: root/LedgerSMB
diff options
context:
space:
mode:
authortetragon <tetragon@4979c152-3d1c-0410-bac9-87ea11338e46>2006-11-29 20:28:21 +0000
committertetragon <tetragon@4979c152-3d1c-0410-bac9-87ea11338e46>2006-11-29 20:28:21 +0000
commitade44d6254848ccae77d2de6e75af7156c6e0f9c (patch)
treef1e56baf5128484b3cb4fb905883b17765dccdc9 /LedgerSMB
parentb941cdae4e0dc3904ed5335b2a49a7be81c65a9a (diff)
Converting some selectrow_array calls to fetchrow_array
git-svn-id: https://ledger-smb.svn.sourceforge.net/svnroot/ledger-smb/trunk@705 4979c152-3d1c-0410-bac9-87ea11338e46
Diffstat (limited to 'LedgerSMB')
-rwxr-xr-xLedgerSMB/AM.pm4
-rwxr-xr-xLedgerSMB/CP.pm4
-rwxr-xr-xLedgerSMB/CT.pm2
-rwxr-xr-xLedgerSMB/IS.pm2
4 files changed, 6 insertions, 6 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 {
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 (?)|;