Ok... with the category relation stored in a separate table, you need to JOIN the tables to find the links/category you need.
What I'm trying to do is:
Update CatLinks
Set CatLinks.CategoryID = 18
where
Select * from CatLinks, Links
where Domain_Name LIKE '%postcard%'
and CatLinks.CategoryID=1
and CatLinks.LinkID = Links.ID
See the problem? I need to find all the links with "postcard" in their name, and move them from one category to another.
This doesn't seem possible with SQL. It looks like it needs to have a separate routine to manage this sort of thing.
The two SQL statements are correct, the problem is I need the first one to execute only if the condition of the second is met.
BTW... the javascript "move" links seems to work ok, but it's too slow to move 100+ links.
PUGDOGŪ
PUGDOGŪ Enterprises, Inc.
FAQ: http://pugdog.com/FAQ
What I'm trying to do is:
Update CatLinks
Set CatLinks.CategoryID = 18
where
Select * from CatLinks, Links
where Domain_Name LIKE '%postcard%'
and CatLinks.CategoryID=1
and CatLinks.LinkID = Links.ID
See the problem? I need to find all the links with "postcard" in their name, and move them from one category to another.
This doesn't seem possible with SQL. It looks like it needs to have a separate routine to manage this sort of thing.
The two SQL statements are correct, the problem is I need the first one to execute only if the condition of the second is met.
BTW... the javascript "move" links seems to work ok, but it's too slow to move 100+ links.
PUGDOGŪ
PUGDOGŪ Enterprises, Inc.
FAQ: http://pugdog.com/FAQ