mixed
DB_NestedSet::createSubNode
(
integer
$id
,
array
$values
)
+-- root1
|
+-\ root2 [target]
| |
| |-- subnode1 [new]
|
+-- root3
$id
Parent node ID
$values
Hash with param => value pairs of the node (see $this->params)
returns The node id or false on error
throws no exceptions thrown
This function can not be called statically.
Create subnodes
<?php
require_once('DB/NestedSet.php');
$nestedSet =& DB_NestedSet::factory('DB', $dsn, $params);
$parent = $nestedSet->createRootNode(array('name' => 'rootnode'), false, true);
$nestedSet->createSubNode($parent, array('name' => "node"));
?>