Re: TREE in a database

From: Date: Tue, 30 Oct 2001 13:19:42 +0000
Subject: Re: TREE in a database
References: 1  Groups: php.db 
Request: Send a blank email to php-db+get-13837@lists.php.net to get a copy of this message
The OASIS project for ad-server uses hierchical system for the sections stored in Mysql. the simplest structure is a row with 3 fields(node_id - autoincrement, parent_id int, data - sometype). the root has parent_id NULL or 0(because autoincrements usually starts from 1, but this is subject to change by user). I think that this makes clear how to implement the tree. Have fun. -- Andrey Hristov Web Developer Icygen Corporation BUILDING SOLUTIONS http://www.icygen.com On Monday 29 October 2001 03:02 pm, you wrote: > Is there an easy way to implement tree structure in a database. > Something like file systems do for files. > > Hints, links, anything.

« previous php.db (#13837) next »