From d7aaab74d2954a44f46da0d72ead64007cae654c Mon Sep 17 00:00:00 2001 From: D Ruth Bavousett Date: Thu, 10 Feb 2011 20:22:27 -0500 Subject: [PATCH] Bug 5230: Call number ranges in export don't give expected results. If you entered low number and high number, you got only items that *exactly* matched either entry (if any). If you enter only a low number, you got everying *lower* than that. If you enter only a high number, you get everything *higher* than that. This was a greater-than-less-than problem. Signed-off-by: Nicole Engard Signed-off-by: Chris Cormack (cherry picked from commit 050466ce2bfbb06108c32ca388a7acca3dca2e4c) Signed-off-by: Chris Nighswonger --- tools/export.pl | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tools/export.pl b/tools/export.pl index a1e9a22800..4d23d08bbf 100755 --- a/tools/export.pl +++ b/tools/export.pl @@ -101,12 +101,12 @@ if ($op eq "export") { } if ( $start_callnumber ) { - $query .= " AND biblioitems.biblionumber = items.biblionumber AND itemcallnumber <= ? "; + $query .= " AND biblioitems.biblionumber = items.biblionumber AND itemcallnumber >= ? "; push @sql_params, $start_callnumber; } if ( $end_callnumber ) { - $query .= " AND biblioitems.biblionumber = items.biblionumber AND itemcallnumber >= ? "; + $query .= " AND biblioitems.biblionumber = items.biblionumber AND itemcallnumber <= ? "; push @sql_params, $end_callnumber; } if ( $start_accession ) { -- 2.39.5