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). <br><br>To access your database from the command-line mysql client, you would do something like this:<br>
<br><div style="margin-left: 40px; font-family: courier new,monospace;">mysql -uUSER -pPASS DB_NAME<br></div><br style="font-family: courier new,monospace;"><span style="font-family: arial,sans-serif;">Get the right USER, PASS and DB_NAME from your KOHA_CONF file. </span>This accesses your database and gives you the mysql command-line, where you do something like:<br style="font-family: courier new,monospace;">
<br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;">mysql> describe marc_subfield_structure;</span><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;">+------------------+--------------+------+-----+---------+-------+</span><br style="font-family: courier new,monospace;">
<span style="font-family: courier new,monospace;">| Field | Type | Null | Key | Default | Extra |</span><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;">+------------------+--------------+------+-----+---------+-------+</span><br style="font-family: courier new,monospace;">
<span style="font-family: courier new,monospace;">| tagfield | varchar(3) | NO | PRI | | | </span><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;">| tagsubfield | varchar(1) | NO | PRI | | | </span><br style="font-family: courier new,monospace;">
<span style="font-family: courier new,monospace;">| liblibrarian | varchar(255) | NO | | | | </span><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;">| libopac | varchar(255) | NO | | | | </span><br style="font-family: courier new,monospace;">
<span style="font-family: courier new,monospace;">| repeatable | tinyint(4) | NO | | 0 | | </span><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;">| mandatory | tinyint(4) | NO | | 0 | | </span><br style="font-family: courier new,monospace;">
<span style="font-family: courier new,monospace;">| kohafield | varchar(40) | YES | MUL | NULL | | </span><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;">| tab | tinyint(1) | YES | | NULL | | </span><br style="font-family: courier new,monospace;">
<span style="font-family: courier new,monospace;">| authorised_value | varchar(10) | YES | | NULL | | </span><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;">| authtypecode | varchar(10) | YES | | NULL | | </span><br style="font-family: courier new,monospace;">
<span style="font-family: courier new,monospace;">| value_builder | varchar(80) | YES | | NULL | | </span><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;">| isurl | tinyint(1) | YES | | NULL | | </span><br style="font-family: courier new,monospace;">
<span style="font-family: courier new,monospace;">| hidden | tinyint(1) | YES | | NULL | | </span><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;">| frameworkcode | varchar(4) | NO | PRI | | | </span><br style="font-family: courier new,monospace;">
<span style="font-family: courier new,monospace;">| seealso | varchar(255) | YES | | NULL | | </span><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;">| link | varchar(80) | YES | | NULL | | </span><br style="font-family: courier new,monospace;">
<span style="font-family: courier new,monospace;">| defaultvalue | text | YES | | NULL | | </span><br style="font-family: courier new,monospace;"><span style="font-family: courier new,monospace;">+------------------+--------------+------+-----+---------+-------+</span><br style="font-family: courier new,monospace;">
<span style="font-family: courier new,monospace;">17 rows in set (0.00 sec)</span><br><br>You might want a command like:<br>UPDATE marc_subfield_structure SET hidden=-6 WHERE tagfield="XYZ" and tagsubfield="ABC"<br>
<br>--joe atzberger<br>
<br><div class="gmail_quote">On Tue, Mar 18, 2008 at 8:02 PM, Gianmarco Spiga <<a href="mailto:gsa25@sfu.ca" target="_blank">gsa25@sfu.ca</a>> wrote:<br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
Jesse <pianohacker@...> writes:<br>
<br>
><br>
> It depends on what you mean. If you want everything to be hidden in the<br>
editor, run some sql to set all the subfields' hidden field (in the table<br>
marc_subfields_structure) to -6, then set it back to 0 for everything you want<br>
to be visible.-- Jesse<br><br>
<br>
Thanks Jesse,<br>
I actually planned to move all of them to the "ignore" tab, as opposed to just<br>
hiding them, but in principle it is the same.<br>
Unfortunately, I have no idea of how to write such a script, I guess I'll have<br>
to learn some SQL. By the way, isn't marc_subfield_structure a perl script? If I<br>
could find the table where all this info is stored I would be halfway done, but<br>
so far I haven't managed to understand the mechanics of Koha.<br>
<br>
One last think: Has anyone written such a script yet? It looks like a pretty<br>
common task to me.<br>
<br>
Thanks for the quick answer!<br>
<br>
-Gianmarco-<br>
<br>
_______________________________________________<br>
Koha mailing list<br>
<a href="mailto:Koha@lists.katipo.co.nz" target="_blank">Koha@lists.katipo.co.nz</a><br>
<a href="http://lists.katipo.co.nz/mailman/listinfo/koha" target="_blank">http://lists.katipo.co.nz/mailman/listinfo/koha</a><br>
</blockquote></div><br>