(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.


* Cal Evans
* The Virtual CIO

-----Original Message-----
From: Leif K-Brooks [mailto:[EMAIL PROTECTED]]
Sent: Thursday, September 26, 2002 10:05 PM
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:
    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 (
To unsubscribe, visit:

PHP Database Mailing List (
To unsubscribe, visit:

Reply via email to