[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

SF.net SVN: ledger-smb: [705] trunk/LedgerSMB



Revision: 705
          http://svn.sourceforge.net/ledger-smb/?rev=705&view=rev
Author:   tetragon
Date:     2006-11-29 12:28:21 -0800 (Wed, 29 Nov 2006)

Log Message:
-----------
Converting some selectrow_array calls to fetchrow_array

Modified Paths:
--------------
    trunk/LedgerSMB/AM.pm
    trunk/LedgerSMB/CP.pm
    trunk/LedgerSMB/CT.pm
    trunk/LedgerSMB/IS.pm

Modified: trunk/LedgerSMB/AM.pm
===================================================================
--- trunk/LedgerSMB/AM.pm	2006-11-29 20:18:49 UTC (rev 704)
+++ trunk/LedgerSMB/AM.pm	2006-11-29 20:28:21 UTC (rev 705)
@@ -233,7 +233,7 @@
 	$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 @@
 
 	$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 {

Modified: trunk/LedgerSMB/CP.pm
===================================================================
--- trunk/LedgerSMB/CP.pm	2006-11-29 20:18:49 UTC (rev 704)
+++ trunk/LedgerSMB/CP.pm	2006-11-29 20:28:21 UTC (rev 705)
@@ -406,7 +406,7 @@
 
 			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 @@
 			$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;
 

Modified: trunk/LedgerSMB/CT.pm
===================================================================
--- trunk/LedgerSMB/CT.pm	2006-11-29 20:18:49 UTC (rev 704)
+++ trunk/LedgerSMB/CT.pm	2006-11-29 20:28:21 UTC (rev 705)
@@ -427,7 +427,7 @@
 		$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 (?)|;
 

Modified: trunk/LedgerSMB/IS.pm
===================================================================
--- trunk/LedgerSMB/IS.pm	2006-11-29 20:18:49 UTC (rev 704)
+++ trunk/LedgerSMB/IS.pm	2006-11-29 20:28:21 UTC (rev 705)
@@ -840,7 +840,7 @@
 		$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 (?)|;


This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.