Gossamer Forum
Home : Products : Gossamer Links : Discussions :

Re: [Koki] Need help with SQL command, please..

Quote Reply
Re: [Koki] Need help with SQL command, please.. In reply to
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
Subject Author Views Date
Thread Need help with SQL command, please.. Koki 4330 Apr 12, 2005, 12:54 PM
Thread Re: [Koki] Need help with SQL command, please..
Alex 4162 Apr 12, 2005, 6:05 PM
Thread Re: [Alex] Need help with SQL command, please..
Koki 4161 Apr 12, 2005, 6:49 PM
Thread Re: [Koki] Need help with SQL command, please..
HyperTherm 4171 Apr 12, 2005, 7:24 PM
Thread Re: [HyperTherm] Need help with SQL command, please..
Koki 4152 Apr 13, 2005, 12:55 AM
Thread Re: [Koki] Need help with SQL command, please..
HyperTherm 4161 Apr 13, 2005, 1:42 AM
Post Re: [HyperTherm] Need help with SQL command, please..
Koki 4201 Apr 13, 2005, 10:50 AM
Thread Re: [Alex] Need help with SQL command, please..
Koki 4123 Apr 13, 2005, 2:13 PM
Thread Re: [Koki] Need help with SQL command, please..
Alex 4154 Apr 13, 2005, 2:18 PM
Post Re: [Alex] Need help with SQL command, please..
Koki 4116 Apr 13, 2005, 2:26 PM