Re: MySQL - How to create a category tree in a store

2009-05-23 Thread Ryan Letulle
@will Good deal. Haven't used below but it seems the author has written a nice book about it on his site. Good luck. -- Ryan On Sat, May 23, 2009 at 2:27 AM, Will Tomlinson wrote: > > I think I'm going to use this tool: > > http://nstree.riaforge.org/ > > I've been playing around with it. S

Re: MySQL - How to create a category tree in a store

2009-05-23 Thread Will Tomlinson
I think I'm going to use this tool: http://nstree.riaforge.org/ I've been playing around with it. Seems fairly straightforward and does everything I need. I'm just working on what the admin interface would look like to display the entire tree so you could select multiple categories for a giv

Re: MySQL - How to create a category tree in a store

2009-05-22 Thread Ryan Letulle
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 t

Re: MySQL - How to create a category tree in a store

2009-05-22 Thread Ryan Letulle
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 throug

Re: MySQL - How to create a category tree in a store

2009-05-22 Thread Will Tomlinson
>@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 som

Re: MySQL - How to create a category tree in a store

2009-05-22 Thread Ryan Letulle
@willr u ok with setting a maximum number of levels? -- Ryan On Fri, May 22, 2009 at 10:14 AM, Will Tomlinson wrote: > > >This might be useful: > > > >http://dev.mysql.com/tech-resources/articles/hierarchical-data.html > > > >Cheers, > > > >Dave > > Yes, there's a lot of great info there. But

Re: MySQL - How to create a category tree in a store

2009-05-22 Thread Will Tomlinson
>This might be useful: > >http://dev.mysql.com/tech-resources/articles/hierarchical-data.html > >Cheers, > >Dave Yes, there's a lot of great info there. But it looks like a nightmare if I want to add a node under the parent. Products -baseball --gloves --bats --shin guards -golf --gloves --ba

Re: MySQL - How to create a category tree in a store

2009-05-22 Thread David Phipps
This might be useful: http://dev.mysql.com/tech-resources/articles/hierarchical-data.html Cheers, Dave > I built a store application that has a simple product category schema. > Right now, the user can select one or more categories to associate to > a given product. I have a linking table in

MySQL - How to create a category tree in a store

2009-05-22 Thread Will Tomlinson
I built a store application that has a simple product category schema. Right now, the user can select one or more categories to associate to a given product. I have a linking table in between those two tables that resolves the many-to-many. Now, I need the ability to let the user create their