From 0ee5b38b1c5f787f02fd7617d3e747dc7c6b51bf Mon Sep 17 00:00:00 2001 From: Mark Gavillet Date: Wed, 6 Apr 2011 14:16:15 +0200 Subject: [PATCH] Bug: 5547 - corrected insert to database Inserting a new category failed because only 10 bind variables were present and 11 were required. Signed-off-by: Katrin Fischer Signed-off-by: Chris Cormack --- admin/categorie.pl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/admin/categorie.pl b/admin/categorie.pl index d0211fdb03..576d7caa94 100755 --- a/admin/categorie.pl +++ b/admin/categorie.pl @@ -133,7 +133,7 @@ if ($op eq 'add_form') { $sth->execute(map { $input->param($_) } ('description','enrolmentperiod','enrolmentperioddate','upperagelimit','dateofbirthrequired','enrolmentfee','reservefee','hidelostitems','overduenoticerequired','category_type','categorycode')); $sth->finish; } else { - my $sth=$dbh->prepare("INSERT INTO categories (categorycode,description,enrolmentperiod,enrolmentperioddate,upperagelimit,dateofbirthrequired,enrolmentfee,reservefee,hidelostitems,overduenoticerequired,category_type) values (?,?,?,?,?,?,?,?,?,?)"); + my $sth=$dbh->prepare("INSERT INTO categories (categorycode,description,enrolmentperiod,enrolmentperioddate,upperagelimit,dateofbirthrequired,enrolmentfee,reservefee,hidelostitems,overduenoticerequired,category_type) values (?,?,?,?,?,?,?,?,?,?,?)"); $sth->execute(map { $input->param($_) } ('categorycode','description','enrolmentperiod','enrolmentperioddate','upperagelimit','dateofbirthrequired','enrolmentfee','reservefee','hidelostitems','overduenoticerequired','category_type')); $sth->finish; } -- 2.39.5