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

SF.net SVN: ledger-smb: [133] tags/1.1



Revision: 133
          http://svn.sourceforge.net/ledger-smb/?rev=133&view=rev
Author:   einhverfr
Date:     2006-09-22 20:52:50 -0700 (Fri, 22 Sep 2006)

Log Message:
-----------
tagging 1.1.1

Modified Paths:
--------------
    tags/1.1/ledger-smb/LedgerSMB/Form.pm

Added Paths:
-----------
    tags/1.1/ledger-smb/

Removed Paths:
-------------
    tags/1.1/ledger-smb/

Copied: tags/1.1/ledger-smb (from rev 131, trunk)

Modified: tags/1.1/ledger-smb/LedgerSMB/Form.pm
===================================================================
--- trunk/LedgerSMB/Form.pm	2006-09-22 17:24:05 UTC (rev 131)
+++ tags/1.1/ledger-smb/LedgerSMB/Form.pm	2006-09-23 03:52:50 UTC (rev 133)
@@ -1280,6 +1280,32 @@
 	}
 }
 
+sub get_custom_queries {
+	my ($self, $tablename) = @_;
+	my @rc;
+	my %temphash;
+	my @elements;
+	my $query;
+	for (@{$self->{custom_db_fields}{$tablename}}){
+		@elements = split (/:/, $_);
+		push @{$temphash{$elements[0]}}, $elements[1];
+	}
+	for (keys %temphash){
+		$query = "SELECT ";
+		my $first = 1;
+		for (@{$temphash{$_}}){
+			$query .= "$_";
+			if ($first == 0){
+				$query .= ", "
+			}
+			$first = 0;
+		}
+		$query .= " FROM $_ WHERE field_id = ?";
+		push @rc, $query;
+	}
+	@rc;
+}
+
 sub dbconnect {
 
 	my ($self, $myconfig) = @_;


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