It seems an easy problem.  You need an intersection | cross-reference | linking table, 
whatever terminology, called Section_Page_LINK something,
to contain sectionID, pageID to resolve many to many relations into
two one to many relations, namely, one section --> many pages and one page --> many 
sections.

Like:
sectionID pageID
1         10
1         20
2         10
3         30
...   



>Hello
>
>Just looking for thoughts on the best way to do this..
>
>I'm creating a site totally db-driven... And I'm looking for a way to allow
>a page to be in more than one section on the site...
>
>So I have 2 tables, page and section (originally enough!)... :)
>
>My thought was to make a field within page called inSection and list the
>sections it is in, and then to loop through and see which sections it in...
>However this seems awfully slow, you have to query each page and then loop
>through all its sections to see if its in the section you want...
>
>Is there a better way to do this? Surely there must be!!
>
>Thanks,
>Ryan
>
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Archives: http://www.houseoffusion.com/cf_lists/index.cfm?forumid=4
Subscription: 
http://www.houseoffusion.com/cf_lists/index.cfm?method=subscribe&forumid=4
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq

This list and all House of Fusion resources hosted by CFHosting.com. The place for 
dependable ColdFusion Hosting.
http://www.cfhosting.com

                                Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
                                

Reply via email to