From c3e3d31ab5b168fba85f1a5cd8b7aea63ea645e7 Mon Sep 17 00:00:00 2001 From: Jonathan Druart Date: Thu, 21 Jun 2012 16:09:04 +0200 Subject: [PATCH 1/1] Bug 7955: Followup: Fix badly use of dbh->quote --- C4/Members/Statistics.pm | 5 ++++- 1 files changed, 4 insertions(+), 1 deletions(-) diff --git a/C4/Members/Statistics.pm b/C4/Members/Statistics.pm index 302259c..0f824a5 100644 --- a/C4/Members/Statistics.pm +++ b/C4/Members/Statistics.pm @@ -50,7 +50,10 @@ sub construct_query { my $fields = C4::Context->preference('StatisticsFields') || 'location|itype|ccode'; my @select_fields = split '\|', $fields; my $query = "SELECT COUNT(*) as count_$count"; - $query .= ", " . C4::Context->dbh->quote( $_ ) for @select_fields; + for my $field ( @select_fields ) { + C4::Context->dbh->quote( $field ); + $query .= ", $field"; + } $query .= " " . $subquery; -- 1.7.7.3