From ce038fd46d070d96894cd1bcb2997c248038ecea Mon Sep 17 00:00:00 2001 From: Tom Bloor Date: Thu, 6 Apr 2017 00:01:01 +0100 Subject: [PATCH] Fix bind mismatch of adding \n to a number --- lib/Pear/LocalLoop/Controller/Admin.pm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/Pear/LocalLoop/Controller/Admin.pm b/lib/Pear/LocalLoop/Controller/Admin.pm index 0e76b41..fd409b1 100644 --- a/lib/Pear/LocalLoop/Controller/Admin.pm +++ b/lib/Pear/LocalLoop/Controller/Admin.pm @@ -77,7 +77,7 @@ sub post_admin_approve { #FIXME there may be race conditions here, so may get the wrong number, mutux is needed. my $statementInsOrg = $self->db->prepare("INSERT INTO Organisations (Name, FullAddress, PostCode) VALUES (?, ?, ?)"); $statementInsOrg->execute($name, $fullAddress, $postcode); - my $organisationalId = $self->db->last_insert_id(undef,undef, "Organisations", "OrganisationalId") . "\n"; + my $organisationalId = $self->db->last_insert_id(undef,undef, "Organisations", "OrganisationalId"); #print "OrgId: " . $organisationalId . "\n"; my $statementSelectPendingTrans = $self->db->prepare("SELECT BuyerUserId_FK, ValueMicroCurrency, ProofImage, TimeDateSubmitted FROM PendingTransactions WHERE PendingSellerOrganisationId_FK = ?");