From 1131bb687f14fef7b4cb5f3b194711e85f9227af Mon Sep 17 00:00:00 2001 From: Jonathan Druart Date: Mon, 10 May 2021 14:27:58 +0200 Subject: [PATCH] Bug 26995: Fix SQL syntax error on the about page Signed-off-by: Jonathan Druart Signed-off-by: Jonathan Druart --- about.pl | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/about.pl b/about.pl index 992bc771f4..a814acc88f 100755 --- a/about.pl +++ b/about.pl @@ -496,17 +496,13 @@ $template->param( 'bad_yaml_prefs' => \@bad_yaml_prefs ) if @bad_yaml_prefs; { my $dbh = C4::Context->dbh; my ($bad_relationships_count) = $dbh->selectall_arrayref(q{ - SELECT COUNT(*) - FROM ( - SELECT relationship FROM borrower_relationships WHERE relationship='_bad_data' + SELECT COUNT(*) FROM borrower_relationships WHERE relationship='_bad_data' }); $bad_relationships_count = $bad_relationships_count->[0]->[0]; my $existing_relationships = $dbh->selectall_arrayref(q{ - SELECT DISTINCT(relationship) - FROM ( - SELECT relationship FROM borrower_relationships WHERE relationship IS NOT NULL + SELECT DISTINCT(relationship) FROM borrower_relationships WHERE relationship IS NOT NULL }); my %valid_relationships = map { $_ => 1 } split( /,|\|/, C4::Context->preference('borrowerRelationship') ); -- 2.39.5