NYCPHP Meetup

NYPHP.org

[nycphp-talk] Building trees

(kris)janis p gale sharpwit at hotmail.com
Wed Oct 16 15:58:36 EDT 2002


or, if you were really lazy,
you could just have a self-referencing table...

tblObjects:
objectID
parentID
fname
lname
etc...

where parentID is the objectID of this object's parent

what's nice about this is, you could query just one table
to find all siblings -- just search for equivalent parentID's.
similarly, it's easy to find orphans and objects that
came before all others -- where parentID = NULL.



More information about the talk mailing list