Gossamer Forum
Home : Products : Gossamer Links : Discussions :

Copying Links

Quote Reply
Copying Links
Ok, here is a different kind of copying links question, and I am wonding if this is an easy SQL query type of solution.

I want to copy all links in my database with a particular word in the title (say "Tennis") to a specific category (say "Tennis" also).

UPDATE lsql_Category SET ........ not sure here.

I do only want to copy and not move, in case it does not produce the desired results.

Thanks
Quote Reply
Re: [sooke] Copying Links In reply to
update = modify in sql
Quote Reply
Re: [webmaster33] Copying Links In reply to
I'm not sure what you mean by this?
Quote Reply
Re: [sooke] Copying Links In reply to
If you are copying you want to INSERT not UPDATE. You'd need to insert into the CatLinks table.
Quote Reply
Re: [Paul] Copying Links In reply to
Hi Paul.... I am still a little confused.

Is this similar to the SQL statement that Andy. put at:

http://www.gossamer-threads.com/...orum.cgi?post=193847

for moving a set of links from one cat to another?
Quote Reply
Re: [sooke] Copying Links In reply to
Are you wanting to copy or move?
Quote Reply
Re: [Paul] Copying Links In reply to
Move basically.

I am trying to consolidate links from a gazillion other categories into other ones... (less categories).
Quote Reply
Re: [Paul] Copying Links In reply to
Actually I need to clarify that last post, I want to do both!

Copy: links which contain a certain word in the title like "Tennis",

and Move: bulk links from one category to another.

One of the issue I am having is that some categories conatin say 100 links to go to one category and 300 for another. A very manual process at the moment as you can imagine.
Quote Reply
Re: [sooke] Copying Links In reply to
There are no direct features in SQL to do a record copy or move between tables
(at least I don't know about it).

However with the help of Perl & SQL together, you can do both copy & move.

1) Copy:
Read record with Perl & SQL from Table_A (use the SELECT command for that task)
INSERT into Table_B

2) Move:
Read record with Perl from Table_A (use the SELECT command for that task)
INSERT into Table_B
DELETE from Table_A

It is not correct syntactically, but this is the main logic.
You can find correct syntaxes in any SQL tutorial.

I hope this helps solving your problem.

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] Copying Links In reply to
Thanks webmaster,

Yes that is a help.... I think I can see what you are doing. Leave that with me, and I am going to give it stab.

Smile
Quote Reply
Re: [webmaster33] Copying Links In reply to
This is turning out to be very complex (at least for me). As as soon as you do one thing to one table it affects others... such as category links totals, lsql_changes, and possibly others??

I think links (myself really) desperatley needs a tool which can move and copy multiple links and categories. One which knows how to make the right changes in all the tables when a copy/move is done.

I used an sql statment for multiple move and this caused big probs with the category counts... so I am not going there again.

I just keep wondering how eveyone is getting by without this? Someone must have a solid method or tool developed.

Unsure