Gossamer Forum
Quote Reply
Subcategories
Hi there.. I've installed the mod that allows you to automatically display subcategories similar to Yahoo. To make this work I have to put SUB0 as the description on each category I want to enable this option for.

Is there a way I can update all descriptions of categories to have SUB0 in them? I have over 7500 categories I would have to update by hand.

Thanks in advance.

Quote Reply
Re: Subcategories In reply to
Pauls:

In SQL Monitor, just run:

Update Category Set Description = 'SUB0'

This will update EVERY Category- every SINGLE one. Also, if there are any current Descriptions, it will overwrite them, so EVERY category will ONLY have SUB0 as a description.

dave

Quote Reply
Re: Subcategories In reply to
Thanks! Worked perfect. :)

Quote Reply
Re: Subcategories In reply to
pauls:

No problem. If youeven want to update some categorys, but not all of them, and there is a field that has something that has info to test, you can:

Update Category set Description = 'SUB0' where FIELD = 'FOO'

Then all category's where Feild = Foo will have Description = SUB0

dave

Quote Reply
Re: Subcategories In reply to
Also, if you want it to look like the FAQ site, where there may be a description in the field already you would like to preserve, you do something like:

update Category
Set Description = concat('SUB0 ', Description)
where ....

I don't remember exactly if I used 'SUB0 ' or 'SUB0\n', but I also tweaked the code a bit to get rid of extra line feeds, so it wouldn't make much difference.




PUGDOGŪ Enterprises, Inc.
FAQ:http://LinkSQL.com/FAQ
Forum:http://LinkSQL.com/forum