From 2d4db263374acdac2688b16a935923ba400b31b3 Mon Sep 17 00:00:00 2001 From: Paul Poulain Date: Wed, 28 Oct 2009 18:28:34 +0100 Subject: [PATCH] fixing SQL builded if there is no where_strings --- C4/Budgets.pm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/C4/Budgets.pm b/C4/Budgets.pm index 6ce1174345..debb6fa20c 100644 --- a/C4/Budgets.pm +++ b/C4/Budgets.pm @@ -489,7 +489,7 @@ sub GetBudgetHierarchy { push @bind_params, $branchcode; } } - $query.=" WHERE ".join(' AND ', @where_strings); + $query.=" WHERE ".join(' AND ', @where_strings) if @where_strings; $debug && warn $query,join(",",@bind_params); my $sth = $dbh->prepare($query); $sth->execute(@bind_params); -- 2.39.5