Projects / Nested Sets DB Tree

Nested Sets DB Tree

Nested Sets DB Tree is a class that can be used to manipulate nested sets of database table records that form an hierarchical tree. It provides the means to initialize the record tree, insert record nodes in specific tree positions, retrieve node and parent records, change the position of nodes, and delete record nodes. It uses ANSI SQL statements and the ADODB library to make it work with many database types. Transactions are supported through the ADODB class. The library supports the gettext multilanguage interface.

Tags
Licenses
Operating Systems
Implementation
Translations

RSS Recent releases

  •  21 Sep 2005 01:25

Release Notes: The requirement of the presence of the GetText expansion was eliminated. The requirement of presence of the ADODB library was eliminated. A full-scale demonstration of the library's capabilities was added.

  •  02 Sep 2005 09:37

Release Notes: This release adds a new function: ChangePositionAll (beta). It swaps nodes within the same level and limits of one parent with all its children; $id1 placed before or after $id2. English documentation and a Russian tutorial have been added.

  •  31 Aug 2005 04:29

Release Notes: Transactions were added. Russian documentation and tutorial were written.

RSS Recent comments

11 May 2007 13:10 tekniklr

Strange database design
Why did you choose to give each element a section_left, section_right, and section_level field instead of a single section_parent field?

As it is now, items occasionally get put in the wrong order in the database by the software, at which point the software becomes incapable of displaying them and humans have a hard time manually fixing the database to get them to show up again.

A specific instance where I've noticed this happening is when an item in the tree is moved up in order to become the first subitem, the root element may keep a section_left of the old first subitem, causing the moved item to simply disappear.

19 Oct 2006 00:49 sinasalek Thumbs up

A really great class
A really great class for show hierarchy records, it makes life a lot easier!

now i'm adding a new dynamic interface (via js) plus some new functionality. i will port back them when ready.

Thanks Kuzma

Screenshot

Project Spotlight

Beastlands - Song of the Were

An RPG action adventure game.

Screenshot

Project Spotlight

Docx to Text Converter (docx2txt)

Perl based utility to extract formatted text content from MS Docx file