Gossamer Forum
Home : Products : Gossamer Links : Discussions :

writing to fields in sql

Quote Reply
writing to fields in sql
I have a large database having imported the open directory local section, But I need to edit it, and I can't edit 141,000 categories individually. Is it possible to write a code that will write information to my database so that I can do if/then things like

if
category = USA (or any categories below eg New York)
then
set the field "banner_486"
to
"bannercode_usa_486"

Also

if
category = USA (or any categories below eg New York)
append the contents of the field "meta_keywords"
with
"usa,united states,america"

Also

if
category includes the word "Business"
then
set the field related categories
to
"business_and_shopping"

An answer to whether this is possible would be a great start, pointing me in the direction of how to do it would be even better.
Quote Reply
Re: writing to fields in sql In reply to
Hi,

You could edit the USA category and set Category_Template to 'usa.html'. Then you know that usa.html will be used whenever displaying that category, or any subcategory of USA. You could put whatever custom banner/graphics you like there.

Cheers,

Alex

--
Gossamer Threads Inc.