Polish language updates
[koha.git] / misc / batchupdateISBNs.pl
index a613b95..03d5bba 100755 (executable)
@@ -63,7 +63,7 @@ my $cpt_isbn = 0;
 if(not $no_isbn){
 
     my $query_isbn = "
-        SELECT biblioitemnumber,isbn FROM biblioitems WHERE isbn IS NOT NULL
+        SELECT biblioitemnumber,isbn FROM biblioitems WHERE isbn IS NOT NULL ORDER BY biblioitemnumber
     ";
 
     my $update_isbn = "
@@ -94,7 +94,7 @@ if(not $no_isbn){
 if(not $no_marcxml){
     
     my $query_marcxml = "
-        SELECT biblioitemnumber,marcxml FROM biblioitems WHERE isbn IS NOT NULL
+        SELECT biblioitemnumber,marcxml FROM biblioitems WHERE isbn IS NOT NULL ORDER BY biblioitemnumber
     ";
     
     
@@ -127,7 +127,7 @@ if(not $no_marcxml){
                 }
            }
             if($flag){
-                $marcxml = $record->as_xml;
+                $marcxml = $record->as_xml_record('UNIMARC');
                 # Update
                 my $sth = $dbh->prepare($update_marcxml);
                 $sth->execute($marcxml,$biblioitemnumber);