diff options
author | Dave Whiteland <dave@mysociety.org> | 2012-12-14 10:24:58 +0000 |
---|---|---|
committer | Dave Whiteland <dave@mysociety.org> | 2012-12-14 10:24:58 +0000 |
commit | 8431d4084e72d38ece6efb8edb3320da48ba8193 (patch) | |
tree | 04279fc468771122d1310fb9c0675884a473a01d /bin/oxfordshire | |
parent | c09f92a1ed3a35d598bf904c18aef438a31f96e0 (diff) |
only bind the params that we need, now defaults are in there
Diffstat (limited to 'bin/oxfordshire')
-rwxr-xr-x | bin/oxfordshire/open311_service_request.cgi | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/bin/oxfordshire/open311_service_request.cgi b/bin/oxfordshire/open311_service_request.cgi index 8d89ad4ff..f46cc8c91 100755 --- a/bin/oxfordshire/open311_service_request.cgi +++ b/bin/oxfordshire/open311_service_request.cgi @@ -360,8 +360,7 @@ sub insert_into_pem { , ce_doc_id OUT NUMBER); END;#); - my %bindings = map {($_, undef)} @PEM_BOUND_VAR_NAMES; - + my %bindings; # comments here are suggested values # fixed values $bindings{":ce_cat"} = 'ENQ'; # or REQS ? @@ -384,7 +383,7 @@ sub insert_into_pem { $bindings{":ce_email"} = substr($$h{$F{EMAIL}}, 0, 50); # 'info@exor.co.uk' $bindings{":ce_description"} = substr($$h{$F{DESCRIPTION}}, 0, 2000); # 'Large Pothole' - foreach my $name (@PEM_BOUND_VAR_NAMES) { + foreach my $name (keys %bindings) { next if grep {$name eq $_} (':error_value', ':error_product', ':ce_doc_id'); # return values my $type = $PEM_BOUND_VAR_TYPES{$name}; $sth->bind_param( |