Gossamer Forum
Home : Products : Gossamer Links : Discussions :

Where Do I set Category Name (or ID #)???

Quote Reply
Where Do I set Category Name (or ID #)???
Hi:

OK, this has been bothering me for a while, and now I have to deal with it!

So, if I make a "|" delimited list of links to import, how do I set the Category they are to go into? I do not see a field in Links for this... and I am confused!

dave

Quote Reply
Re: Where Do I set Category Name (or ID #)??? In reply to
Dave, You will have to add relationship information to table CatLinks. This table relates LinkID to CategoryID.

Quote Reply
Re: Where Do I set Category Name (or ID #)??? In reply to
Hi,

lparry is correct. You need to import into CatLinks table which looks like:

LinkID => CategoryID

Cheers,

Alex

--
Gossamer Threads Inc.
Quote Reply
Re: Where Do I set Category Name (or ID #)??? In reply to
Alex/Larry:

Thanks- I knew it was something tricky. So, I guess I cannot just make a database locally of just the link and upload that... I would need to do that, then upload the links numbers and the corresponding Cat ID into a second DB... Hmmmm..

dave

Quote Reply
Re: Where Do I set Category Name (or ID #)??? In reply to
I've done this, when importing records -- especially if I know that all the records will go into one category (or I move them all into one category for later sorting).

The SQL statements are:

insert into CatLinks (LinkID)
Select ID from Links
where Links.Add_Date = '2000-12-21'

.... where the 'where' clause is something unique to the links being added. It could even be the ID's ie: where ID >= first_new_ID

Then, you need to add the other half of the CatLinks information:

update CatLinks
Set CategoryID = '1'
where CategoryID = ''


And the '1' is whatever category you want to move them into. I have an "unclassified" category in most sites for this purpose. Then, I validate/move the links.



PUGDOGŪ
PUGDOGŪ Enterprises, Inc.
FAQ: http://pugdog.com/FAQ


Quote Reply
Re: Where Do I set Category Name (or ID #)??? In reply to
Or in one step:

insert into CatLinks (CategoryID,LinkID)
Select 123,ID from Links
where Links.Add_Date = '2000-12-21'

where 123 is the category you want to place them into. =)

Cheers,

Alex

--
Gossamer Threads Inc.
Quote Reply
Re: Where Do I set Category Name (or ID #)??? In reply to
Cool Pugdog!

Thanks a lot!

So, I did not see a utility like in the old version that checks that all links are correctly associated with a category. This would be handy just for housekeeping.... but also, if you uploaded a bunch to one category, you could just fix it there!

So, Hint Hint!

dave