corrected init script name for apache2
[koha.git] / misc / exportauth.pl
blobb1dad03a717945400a30a307d4cda5dc50a6babd
1 #!/usr/bin/perl
2 ## This script allows you to export a rel_2_2 bibliographic db in
3 #MARC21 format from the command line.
6 use strict;
7 require Exporter;
9 use C4::Auth;
10 use C4::Output; # contains gettemplate
11 use C4::Biblio;
12 use CGI;
13 use C4::Auth;
14 my $outfile = $ARGV[0];
15 open(OUT,">$outfile") or die $!;
16 my $query = new CGI;
17 my $dbh=DBI->connect("DBI:mysql:database=koha2;host=localhost;port=3306","kohaserver","kohaserver") or die $DBI::errmsg;
18 #$dbh->do("set character_set_client='latin5'");
19 #$dbh->do("set character_set_connection='utf8'");
20 #$dbh->do("set character_set_results='latin5'");
21 #my $dbh=C4::Context->dbh;
22 my $sth;
24 $sth=$dbh->prepare("select marc from auth_header order by authid");
25 $sth->execute();
27 while (my ($marc) = $sth->fetchrow) {
29 print OUT $marc;
31 close(OUT);