From 4ab317563948efc6122190b4cbbfe89e80c792c6 Mon Sep 17 00:00:00 2001 From: Paul Poulain Date: Mon, 4 Apr 2011 15:19:32 +0200 Subject: [PATCH] Bug 6043: SQL error when IndependantBranches=ON on suggestion On suggestion page, when IndependantBranch=ON, the SQL built is wrong: branchcode is ambiguous Signed-off-by: Katrin Fischer Signed-off-by: Chris Cormack (cherry picked from commit 09e2ee605845e9cb03f21f2596404d60d1e9fc74) Signed-off-by: Chris Nighswonger --- C4/Suggestions.pm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/C4/Suggestions.pm b/C4/Suggestions.pm index 81ff731696..56a4b9d7a1 100644 --- a/C4/Suggestions.pm +++ b/C4/Suggestions.pm @@ -126,7 +126,7 @@ sub SearchSuggestion { if ($userenv) { if (($userenv->{flags} % 2) != 1 && !$suggestion->{branchcode}){ push @sql_params,$$userenv{branch}; - push @query,q{ and (branchcode = ? or branchcode ='')}; + push @query,q{ and (suggestions.branchcode = ? or suggestions.branchcode ='')}; } } } -- 2.39.5