From 63f1ea0c2dcd442ce0cb3b29d40f5015dceb5bab Mon Sep 17 00:00:00 2001 From: Henri-Damien LAURENT Date: Fri, 1 Apr 2011 10:34:51 +0200 Subject: [PATCH] Bug 6026 : export.pl : removing useless condition Some conditions added AND items.biblionumber=biblio/biblionumber where JOIN USING (biblionumber) already added that. Signed-off-by: Julian Maurice Signed-off-by: Chris Cormack --- tools/export.pl | 30 +++++++++++++++--------------- 1 file changed, 15 insertions(+), 15 deletions(-) diff --git a/tools/export.pl b/tools/export.pl index 4d23d08bbf..fc0c7be95b 100755 --- a/tools/export.pl +++ b/tools/export.pl @@ -94,28 +94,28 @@ if ($op eq "export") { $query .= " AND biblioitems.biblionumber <= ? "; push @sql_params, $EndingBiblionumber; } - - if ( $branch ) { - $query .= " AND biblioitems.biblionumber = items.biblionumber AND homebranch = ? "; + + if ($branch) { + $query .= " AND homebranch = ? "; push @sql_params, $branch; } - - if ( $start_callnumber ) { - $query .= " AND biblioitems.biblionumber = items.biblionumber AND itemcallnumber >= ? "; + + if ($start_callnumber) { + $query .= " AND itemcallnumber <= ? "; push @sql_params, $start_callnumber; } - - if ( $end_callnumber ) { - $query .= " AND biblioitems.biblionumber = items.biblionumber AND itemcallnumber <= ? "; + + if ($end_callnumber) { + $query .= " AND itemcallnumber >= ? "; push @sql_params, $end_callnumber; } - if ( $start_accession ) { - $query .= " AND biblioitems.biblionumber = items.biblionumber AND dateaccessioned >= ? "; - push @sql_params,$start_accession->output('iso'); + if ($start_accession) { + $query .= " AND dateaccessioned >= ? "; + push @sql_params, $start_accession->output('iso'); } - - if ( $end_accession ) { - $query .= " AND biblioitems.biblionumber = items.biblionumber AND dateaccessioned <= ? "; + + if ($end_accession) { + $query .= " AND dateaccessioned <= ? "; push @sql_params, $end_accession->output('iso'); } -- 2.39.5