Gossamer Forum
Home : Products : Gossamer Links : Discussions :

SQL command help

Quote Reply
SQL command help
Should be an easy one for the gurus, how do I insert SUB1 into all my existing category description fields?

TIA
Quote Reply
Re: [loxly] SQL command help In reply to
Code:
UPDATE yourprefixCategory SET Description = 'SUB1' WHERE Description = ''

Adrian
Quote Reply
Re: [brewt] SQL command help In reply to
In Reply To:
Code:
UPDATE yourprefixCategory SET Description = 'SUB1' WHERE Description = ''

Thanks Adrian, I knew it would be simple.... but didn't want to bomb my database.... lol
Quote Reply
Re: [brewt] SQL command help In reply to
Are you sure?
This updates just where there is not description.

Best regards,
Webmaster33


Paid Support
from Webmaster33. Expert in Perl programming & Gossamer Threads applications. (click here for prices)
Webmaster33's products (upd.2004.09.26) | Private message | Contact me | Was my post helpful? Donate my help...
Quote Reply
Re: [webmaster33] SQL command help In reply to
Which is what loxly probably wanted. Obviously if you want it to update all descriptions, you would remove the where clause.

Adrian
Quote Reply
Re: [brewt] SQL command help In reply to
Based on what loxly said, she wants to insert SUB1 before description. She did not wrote "replace", but wrote "insert". I suppose she has descriptions already, and she doesn't want to delete them.

I don't remember how the Yahoo plugin works, so your answer may be still right.

Best regards,
Webmaster33


Paid Support
from Webmaster33. Expert in Perl programming & Gossamer Threads applications. (click here for prices)
Webmaster33's products (upd.2004.09.26) | Private message | Contact me | Was my post helpful? Donate my help...
Quote Reply
Re: [webmaster33] SQL command help In reply to
In Reply To:
Based on what loxly said, she wants to insert SUB1 before description. She did not wrote "replace", but wrote "insert". I suppose she has descriptions already, and she doesn't want to delete them.

I don't remember how the Yahoo plugin works, so your answer may be still right.

Adrian got it right, I used the word insert because I didn't consider it replacing blanks. I would like to do what webmaster33 describes, but it isn't a big deal, I don't have that many categories that already have descriptions, and the ones that do could use editing anyway (this site is 3 years old). So for the categories that have descriptions I am editing them to use the SUB1 and moving the description to the meta tags.

Here's another related question, can I insert the contents of a field into the meta tags for the categories, something like:
<%Full_Name%> at <%sitename%>
in the meta description for instance?