create a table like this: id | parent_id | category parent_id points to the parent categories id. Top level categories get parent_id of '0'
ex: 1 | 0 | auto 2 | 1 | repair 3 | 2 | body 4 | 2 | windshields 5 | 1 | detailing 6 | 2 | tires Tree would look like: auto repair body windshields tires detailing olinux --- hassan <[EMAIL PROTECTED]> wrote: > HI, > >For trees you need self joins. > > Could You please explain that ? > > Regards, > > > At 19:11 23/05/02, Georg Richter wrote: > >On Thursday, 23. May 2002 16:16, Sagi Bashari > wrote: > >Hi, > > > ><snip> > > > > > > How can I get MySQL to sort it like that? I > tried to use group/order by, > > > but I cannot get it to sort it this way.. > > > > > > Any ideas? > ></snip> > > > >For trees you need self joins. > > > >Regards > > > > > >Georg > > > > > >mysql, query > > > >--------------------------------------------------------------------- > >Before posting, please check: > > http://www.mysql.com/manual.php (the manual) > > http://lists.mysql.com/ (the list > archive) > > > >To request this thread, e-mail > <[EMAIL PROTECTED]> > >To unsubscribe, e-mail > ><[EMAIL PROTECTED]> > >Trouble unsubscribing? Try: > http://lists.mysql.com/php/unsubscribe.php > > ___________________________________________________ > Hassan El Forkani > Founder And Mantainer of : > http://WarmAfrica.com EveryOne's Africa > Freelance Internet Consultant / Web Applications > Developper. > Email: [EMAIL PROTECTED] > Tel : 0021671880014 > ___________________________________________________ > > > --------------------------------------------------------------------- > Before posting, please check: > http://www.mysql.com/manual.php (the manual) > http://lists.mysql.com/ (the list > archive) > > To request this thread, e-mail > <[EMAIL PROTECTED]> > To unsubscribe, e-mail > <[EMAIL PROTECTED]> > Trouble unsubscribing? Try: > http://lists.mysql.com/php/unsubscribe.php > __________________________________________________ Do You Yahoo!? Yahoo! - Official partner of 2002 FIFA World Cup http://fifaworldcup.yahoo.com --------------------------------------------------------------------- Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail <[EMAIL PROTECTED]> To unsubscribe, e-mail <[EMAIL PROTECTED]> Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php