View Single Post

   
  #3 (permalink)  
Old 02-28-2008, 11:27 AM
ars_oguz
 
Posts: n/a
Default Re: Categories, subcategories table design

On Aug 26, 9:35 pm, "Paul Lautman" <paul.laut...@btinternet.com>
wrote:
> ars_oguz wrote:
> > i will have a table for categories something like

>
> > id
> > parent_id
> > title

>
> > so that i can put multiple depth categories like

>
> > aaa >> bbb >> ccc >> ddd

>
> > the problem is that when the user clicks aaa the site should show all
> > products in both aaa and its children and grandchildren like in bbb,
> > ccc , ddd etc.

>
> > i can make this with giving ids that contains parent ids like

>
> > aaa
> > aaabbb
> > aaabbbccc
> > aaabbbcccddd

>
> > and use "where category_id like 'aaa%' "

>
> > but i don't what to use such thing because when i have thousands of
> > products it will take too much time.

>
> > is there any solution for this with integers etc.

>
> > Thanks for your help...

>
> Take a look at these:
>
> http://www.sitepoint.com/article/hie...tml;jsessionid...


Thanks, that is what i have been looking for...

Reply With Quote