[Koha-patches] [PATCH 1/3] export.pl : removing useless condition

paul.poulain at biblibre.com paul.poulain at biblibre.com
Wed Jan 19 22:19:12 CET 2011


From: Henri-Damien LAURENT <henridamien.laurent at biblibre.com>

Some conditions added AND items.biblionumber=biblio/biblionumber
where JOIN USING (biblionumber) already added that.
---
 tools/export.pl |   30 +++++++++++++++---------------
 1 files changed, 15 insertions(+), 15 deletions(-)

diff --git a/tools/export.pl b/tools/export.pl
index a1e9a22..fc0c7be 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');
     }
     
-- 
1.7.1



More information about the Koha-patches mailing list