summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authoreinhverfr <einhverfr@4979c152-3d1c-0410-bac9-87ea11338e46>2006-10-11 02:02:37 +0000
committereinhverfr <einhverfr@4979c152-3d1c-0410-bac9-87ea11338e46>2006-10-11 02:02:37 +0000
commit185b9cd6739ca72e7ba7bce6c74ebdea0b3aab7e (patch)
treecf069566067fcb50e9038d76052f0ff42324d349
parent5bf9d39b3209bef67ebf55eae15b0631fd2d5557 (diff)
Preprocess the callproc procname so that the first () becomes the argstr.
git-svn-id: https://ledger-smb.svn.sourceforge.net/svnroot/ledger-smb/trunk@203 4979c152-3d1c-0410-bac9-87ea11338e46
-rwxr-xr-xLedgerSMB/Form.pm3
1 files changed, 2 insertions, 1 deletions
diff --git a/LedgerSMB/Form.pm b/LedgerSMB/Form.pm
index e5fa4f61..65e352e6 100755
--- a/LedgerSMB/Form.pm
+++ b/LedgerSMB/Form.pm
@@ -515,7 +515,8 @@ sub callproc {
$argstr .= "?, ";
}
$argstr =~ s/\, $//;
- $query = "SELECT $procname($argstr)";
+ $query = "SELECT $procname";
+ $query =~ s/\(\)/$argstr/;
my $sth = $form->{dbh}->prepare($query);
while (my $ref = $sth->fetchrow_hashref(NAME_lc)){
push @results, $ref;