[Koha] Mapping fields to
Joe Atzberger
ohiocore at gmail.com
Fri Mar 21 05:07:26 NZDT 2008
No, marc_subfields_structure is a table in your koha database. You want to
edit the data there, not the logic of how it processed (in perl).
To access your database from the command-line mysql client, you would do
something like this:
mysql -uUSER -pPASS DB_NAME
Get the right USER, PASS and DB_NAME from your KOHA_CONF file. This
accesses your database and gives you the mysql command-line, where you do
something like:
mysql> describe marc_subfield_structure;
+------------------+--------------+------+-----+---------+-------+
| Field | Type | Null | Key | Default | Extra |
+------------------+--------------+------+-----+---------+-------+
| tagfield | varchar(3) | NO | PRI | | |
| tagsubfield | varchar(1) | NO | PRI | | |
| liblibrarian | varchar(255) | NO | | | |
| libopac | varchar(255) | NO | | | |
| repeatable | tinyint(4) | NO | | 0 | |
| mandatory | tinyint(4) | NO | | 0 | |
| kohafield | varchar(40) | YES | MUL | NULL | |
| tab | tinyint(1) | YES | | NULL | |
| authorised_value | varchar(10) | YES | | NULL | |
| authtypecode | varchar(10) | YES | | NULL | |
| value_builder | varchar(80) | YES | | NULL | |
| isurl | tinyint(1) | YES | | NULL | |
| hidden | tinyint(1) | YES | | NULL | |
| frameworkcode | varchar(4) | NO | PRI | | |
| seealso | varchar(255) | YES | | NULL | |
| link | varchar(80) | YES | | NULL | |
| defaultvalue | text | YES | | NULL | |
+------------------+--------------+------+-----+---------+-------+
17 rows in set (0.00 sec)
You might want a command like:
UPDATE marc_subfield_structure SET hidden=-6 WHERE tagfield="XYZ" and
tagsubfield="ABC"
--joe atzberger
On Tue, Mar 18, 2008 at 8:02 PM, Gianmarco Spiga <gsa25 at sfu.ca> wrote:
> Jesse <pianohacker at ...> writes:
>
> >
> > It depends on what you mean. If you want everything to be hidden in the
> editor, run some sql to set all the subfields' hidden field (in the table
> marc_subfields_structure) to -6, then set it back to 0 for everything you
> want
> to be visible.-- Jesse
>
>
> Thanks Jesse,
> I actually planned to move all of them to the "ignore" tab, as opposed to
> just
> hiding them, but in principle it is the same.
> Unfortunately, I have no idea of how to write such a script, I guess I'll
> have
> to learn some SQL. By the way, isn't marc_subfield_structure a perl
> script? If I
> could find the table where all this info is stored I would be halfway
> done, but
> so far I haven't managed to understand the mechanics of Koha.
>
> One last think: Has anyone written such a script yet? It looks like a
> pretty
> common task to me.
>
> Thanks for the quick answer!
>
> -Gianmarco-
>
> _______________________________________________
> Koha mailing list
> Koha at lists.katipo.co.nz
> http://lists.katipo.co.nz/mailman/listinfo/koha
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.katipo.co.nz/pipermail/koha/attachments/20080320/883233df/attachment.htm
More information about the Koha
mailing list