[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Koha-devel] marc_word rebuild problems
From: |
Joshua Ferraro |
Subject: |
Re: [Koha-devel] marc_word rebuild problems |
Date: |
Tue Jun 8 20:49:05 2004 |
User-agent: |
Mutt/1.4.1i |
Paul et al,
OK, I think I've got a marc_word rebuild script working finally ...
as long as subfieldvalue in marc_subfield_table is the same as
'sentence' in the MARCaddword subroutine.
However, I have been getting an internal server error from
apache as well as some strange errors in the opac-error_log when
I do a search using the new opac MARC search. I assume they are
related to recent changes in the code and constitute bugs but I
thought I'd better check and make sure that it's not a data problem
first. Here are the errors:
[Tue Jun 8 23:41:14 2004] [error] [client 24.208.182.186] Premature end of
script headers: /usr/local/koha/opac/cgi-bin/opac-search.pl
DBD::mysql::st execute failed: Unknown column 'frameworkcode' in 'where clause'
at /usr/local/koha/intranet/modules//C4/Biblio.pm line 230.
DBD::mysql::st fetchrow failed: fetch() without execute() at
/usr/local/koha/intranet/modules//C4/Biblio.pm line 231.
DBD::mysql::st execute failed: Unknown column 'frameworkcode' in 'where clause'
at /usr/local/koha/intranet/modules//C4/Biblio.pm line 234.
DBD::mysql::st fetchrow failed: fetch() without execute() at
/usr/local/koha/intranet/modules//C4/Biblio.pm line 236.
DBD::mysql::st execute failed: Unknown column 'hidden' in 'field list' at
/usr/local/koha/intranet/modules//C4/Biblio.pm line 244.
DBD::mysql::st fetchrow failed: fetch() without execute() at
/usr/local/koha/intranet/modules//C4/Biblio.pm line 254.
Q : select distinct m1.bibid from biblio,biblioitems,marc_biblio,marc_word as
m1 where biblio.biblionumber=marc_biblio.biblionumber and
biblio.biblionumber=biblioitems.biblionumber and m1.bibid=marc_biblio.bibid and
(m1.word like 'Chorao%' and m1.tag+m1.subfieldid in ('100a')) order by
biblio.title at /usr/local/koha/intranet/modules//C4/SearchMarc.pm line 170.
Can't use an undefined value as a HASH reference at
/usr/local/koha/intranet/modules//C4/SearchMarc.pm line 266.
[Tue Jun 8 23:41:29 2004] [error] [client 24.208.182.186] Premature end of
script headers: /usr/local/koha/opac/cgi-bin/opac-search.pl
BTW: here is the final build_marc_word script:
#!/usr/bin/perl -w
use lib '/usr/local/koha/intranet/modules/';
use strict;
use C4::Context;
use C4::Biblio;
my $dbh=C4::Context->dbh;
my @tags=(100, 245);
foreach my $tag (@tags) {
my $query="SELECT
bibid,tag,tagorder,subfieldid,subfieldorder,subfieldvalue FROM
marc_subfield_table WHERE tag=? limit 0,20";
my $sth=$dbh->prepare($query);
$sth->execute($tag);
while (my $data=$sth->fetchrow_hashref()){
MARCaddword($dbh,$data->{'bibid'},$data->{'tag'},$data->{'tagorder'},$data->{'subfieldid'},$data->{'subfieldorder'},$data->{'subfieldvalue'});
}
}
$dbh->disconnect();
NPL is compiling a list of important tags to index and I'll add those when
I have the complete list and commit the script to CVS...
Thanks,
Joshua
> Paul et al,
>
> Here's the latest version of the script (the other one had some serious
> syntax errors :-)). I still get the following error when I run it and
> marc_word is not getting populated. Is the MARCaddword subroutine not
> working properly or am I confused about how to use it? 'sentence' is
> just the 'subfieldvalue' in marc_subfield_table, right?
>
> #!/usr/bin/perl -w
> use lib '/usr/local/koha/intranet/modules/';
> use strict;
> use C4::Context;
> use C4::Biblio;
> my $dbh=C4::Context->dbh;
> #FIXME: for now tag 100 is hardcoded; eventually I plan
> #to derive a list of tags (and subfields?) from an outfile
> my $tag="100";
>
> my $query="SELECT bibid,tag,tagorder,subfieldid,subfieldorder,subfieldvalue
> FROM marc_subfield_table WHERE tag=? LIMIT 0,20";
> my $sth=$dbh->prepare($query);
> $sth->execute($tag);
> while (my $data=$sth->fetchrow_hashref()){
>
> MARCaddword($dbh,$data->{'bibid'},$data->{'tag'},$data->{'subfieldid'},$data->{'subfieldorder'},$data->{'subfieldvalue'});
> }
> $dbh->disconnect();
>
>
> -------------------------------------------------------
> This SF.Net email is sponsored by: GNOME Foundation
> Hackers Unite! GUADEC: The world's #1 Open Source Desktop Event.
> GNOME Users and Developers European Conference, 28-30th June in Norway
> http://2004/guadec.org
> _______________________________________________
> Koha-devel mailing list
> address@hidden
> https://lists.sourceforge.net/lists/listinfo/koha-devel