aqbooksellers
authorDobrica Pavlinusic <dpavlin@rot13.org>
Mon, 27 Jun 2011 22:27:15 +0000 (00:27 +0200)
committerDobrica Pavlinusic <dpavlin@rot13.org>
Mon, 27 Jun 2011 22:30:22 +0000 (00:30 +0200)
ferlib2koha.pl

index fdec3c7..e702ddb 100755 (executable)
@@ -11,7 +11,7 @@ $|++;
 
 my $import = {
        borrowers => $ENV{FULL} || 0,
-       issues    => $ENV{FULL} || 1,
+       issues    => $ENV{FULL} || 0,
        reserves  => $ENV{FULL} || 0,
        barcode   => $ENV{FULL} || 0,
 };
@@ -390,6 +390,28 @@ while( my $row = $sth->fetchrow_hashref ) {
 } # import->{barcode}
 
 
+sub aqbooksellers {
+       my ($sql) = @_;
+       my $sth = $f->prepare($sql);
+       $sth->execute;
+
+       $insert = undef;
+
+       while (my $row = $sth->fetchrow_hashref ) {
+               insert 'aqbooksellers' => $row;
+       }
+}
 
+sql $k => qq{
+delete from aqbooksellers;
+alter table aqbooksellers auto_increment = 1;
+};
+aqbooksellers qq{
+select
+       ozn_nacdob as notes,
+       opis_nacdob as name,
+       'HRK' as currency
+from nacdob
+};
 
 $k->commit;