In cf pseudocode (and no it's not the most efficient way, but should work)
Select t.ArticleID, count(t.SearchTagID) as NumberOfOverlappingTags
from ArticleSearchTag t where t.SearchTagID in (Select t2.SearchTagID from
ArticleSearchTag t2 where t2.ArticleID=#ViewedArticleID#)
GROUP BY t.ArticleID
This should get you the list of articles, and a count of how many tags they
have in commen with the article you're viewing...
Would this work for you??
dov
-----Original Message-----
From: Damien McKenna [mailto:[EMAIL PROTECTED]
Sent: Thursday, January 04, 2007 1:03 PM
To: CF-Talk
Subject: Re: Using a tag system like del.icio.us(sort of)
On 1/4/07 12:46 PM, Jack Morgan wrote:
> ------------------
> ArticleSearchTag - table
> ------------------
> ArticleSearchTagID - PK
> SearchTagID - FK many to many
> ArticleID - FK many to many
Why not just do this as:
ArticleSearchTag
SearchTagID
ArticleID
Make them both the primary key and foreign keys to their respective tables.
I think you can do that?
--
Damien McKenna - Web Developer - [EMAIL PROTECTED] The Limu Company -
http://www.thelimucompany.com/ - 407-804-1014 #include <stdjoke.h>
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Create robust enterprise, web RIAs.
Upgrade & integrate Adobe Coldfusion MX7 with Flex 2
http://ad.doubleclick.net/clk;56760587;14748456;a?http://www.adobe.com/products/coldfusion/flex2/?sdid=LVNU
Archive:
http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:265658
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe:
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4