Gossamer Forum
Home : Products : Gossamer Links : Version 1.x :

SQL Command for Adding to Alt Categories

Quote Reply
SQL Command for Adding to Alt Categories
Does anyone know and SQL Command for how I can add all the various categorized links into the same alternate category. I have this need to print out all my links on one page, and I need them all in the same category, as well as their current categories. I have over a 1000 links and the thought of having to do them one at a time makes my eyes turn inside out.

Thanks anyone,

Kyle



Quote Reply
Re: SQL Command for Adding to Alt Categories In reply to
I don't have my SQL book here, but you'd want to see about doing something like:

Edit the CategoryAlternates Table using a program like MySQLMan, and set the default value for the CategoryID field to be the number of the category you want all the new links to be in, then execute a statement like:

INSERT INTO Category_Alternates (LinkID)
SELECT (ID) FROM Links

I can't figure out (get to work) a statement where I assign the CategoryID a static value. Maybe someone else can complete the statement. If

http://www.postcards.com
FAQ: http://www.postcards.com/FAQ/LinkSQL/