| » Metadata | » Status |
|---|---|
|
|
| » Description | |
|
Database_SQL_Intervals does an abstraction between an SQL table which is formated as a hierarchy table using intervals. It help developper to use a hierarchy without many reflexions. The class is able to: - Create elements [into others] - Remove elements (and its children) - Move element into another A new hierarchy gestion Hierarchy gestion is a complex think and in a database or in a static file, this hierachy have to be structured to be (re)used after. The hierarchy gestion using intervals is a way to structure your hierarchy tables. Contrary to recursive method, the intervals method provide a very simple DB structure which can be (partitaly or not) export even more simply ! A more complex table In fact, (just!) into the table, values structure is more complex. It's why using a library to manage these tables is great : you're sure that you'll not break the table integrity with your table management. Very simple to use: <?phpExample Consider a table "my_table" like this: ![]() <?php At the moment, we have a table like: ![]() Which is provide this hierarchy: ![]() <?phpAt the end of the first function, we have a hierarchy tree like: ![]() And at the end of the second function: ![]() Which it structured into the table: ![]() To remove an object, you just have to call "remove" method: <?phpAnd the tree's like that: ![]() Note: package.xml & documentations will be generated after corrections which you'll give me will be done. :) See test/tests.php |
|
| » Dependencies | » Links |
|
|
| » Timeline | » Changelog |
|
|