Home : Products : Gossamer Links : Discussions :

Products: Gossamer Links: Discussions: Re: [Koki] Need help with SQL command, please..: Edit Log

Here is the list of edits for this post
Re: [Koki] Need help with SQL command, please..
Hi,

If your db doesn't support subselects, then you need to do:

SELECT ID FROM lsql_Links WHERE Title="..."

into a file, then:

UPDATE lsql_CatLinks SET CategoryID=123 WHERE LinkID IN (list of id's from file);

If you are on a database that supports subselects, you could do it with:

UPDATE lsql_CatLinks SET CategoryID=123 WHERE LinkID IN ( SELECT ID FROM lsql_Links WHERE Title="..." );

Edit to add: Any changes like this will require a repair table to reset category counts.

Cheers,

Alex
--
Gossamer Threads Inc.

Last edited by:

Alex: Apr 12, 2005, 6:06 PM

Edit Log: