[Pugged] Related Resources

David Champion ciapug@ciapug.org
Fri, 28 Mar 2003 13:41:41 -0600


I'd put the resource links into a sub table (like I think Chris has seen 
me do for categories). So you have a lookup table, a "link" table with 
the article id and a link id, and the article table.

That way you can have as many links per article as you want, and don't 
have to mess with parsing the comma separated list or anything.

Does that make sense?

-dc

Chris Hettinger wrote:
> Hello PHPers...
>  
> I would like some input on a project that I am just starting. I would 
> like feedback telling me if I am on the best path for this scenario, and 
> if not recommendations are welcomed.
>  
> The project in summary... I have a database table containing articles 
> (title, article, keywords...). On the viewing end, when an article is 
> viewed on the web site I have a area designated for "Related Resources."
>  
> The path that occurred to me to create this list of related resources 
> was to include a field for each article that contained a comma separated 
> list of keywords. When the page is requested a process would select the 
> article they are viewing, then when I create the related resources 
> listing I would take the value of the keywords list from the selected 
> article, and have to do a comparison to the keywords listing for all of 
> the other articles. Where a keyword matched, I would then include that 
> article as a related resource.
>  
> So am I considering the best method for doing this? This seems like it 
> could become a very inefficient query as my db table grows.
>  
> Thanks for any input.
>  
> -Chris Hettinger