Also depending on your traffic versus how often the products will get
updated versus your hosting plan etc you may want to output the entire tree
at the time of it being maintained on the back end rather than every time
someone visits the site.
Don't know your situation, just an idea if you need to limit hits on the
database.

--
Ryan



On Fri, May 22, 2009 at 11:11 AM, Ryan Letulle <[email protected]> wrote:

> I am assuming you at least have product_id and category_id in your linking
> table. I think if you added a parent_id accounting for the root level you
> could build out your tree.
> Not sure of how you want to go about it but thinking out loud:
>
>    1. Query all categories at root level
>    2. Loop through root level and pull children (all those with a parent
>    as that category)
>    3. Repeat this for the max levels
>    4. Pull products at each level (1,2,3,4)
>
>
> Basically you are only assigning one sub/category but you have the
> hierarchical relationship stored in the db.
>
> You would have to account for that when searching on the front end.  Front
> end I would suggest jQuery for an accordion like effect(slidedown/up and/or
> fadein/out) and pull the products using the ajax or load method.
>
> --
> Ryan
>
>
>
>
> On Fri, May 22, 2009 at 10:41 AM, Will Tomlinson <[email protected]>wrote:
>
>>
>> >@willr u ok with setting a maximum number of levels?
>> >
>> >--
>> >Ryan
>> >
>>
>> Yep. I could max it out at 4 levels. I had thought about building related
>> tables, 4 of them.
>>
>> Thanks,
>> Will
>>
>> 

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Want to reach the ColdFusion community with something they want? Let them know 
on the House of Fusion mailing lists
Archive: 
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:322715
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4

Reply via email to