http://www.amazon.com/exec/obidos/tg/detail/-/1558605762/qid=1033128099/sr=8
-1/ref=sr_8_1/104-0156092-0439928?v=glance&n=507846

(beware the wrap)

Chapters 28 and 29 are on SQL trees.  Beware this is a pretty deep subject
and you need to be firmly grounded in SQL before reading it.  That being
said, read chapter 28 and then 29.  If you do this, at the end of chapter 29
he gives you a (relatively) simply way to accomplish what you want to do.
I've used it now for menu trees and user trees and it's working great.

HTH,
=C=

*
* Cal Evans
* The Virtual CIO
* http://www.calevans.com
*


-----Original Message-----
From: Leif K-Brooks [mailto:[EMAIL PROTECTED]]
Sent: Thursday, September 26, 2002 10:05 PM
To: [EMAIL PROTECTED]
Subject: [PHP-DB] Categorized list?


I'm trying to create a system to store virtual "objects".  Each object
will be in a category, and the categories may be in other categories.
 The categorie list might look something like:
Food
    Candy
    Healthy Food
        Vegeterian food
        Organic food
    Gross food

I'm thinking of a datbase structure for the categorys something like:
id (int, auto_inc, primary)
name (text)
insideof(int, id of other catrgory which this one is inside of)

The problem is, I need to generate an indented list such as I showed
before.  I know how to do this with a lot of colors (selecting what each
category contains, etc.), but is there a more effieient way?  I use
mysql.  Thanks for any ideas.



--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to