| Rob Barreca 2005-03-19, 3:57 am |
| I've been trying to get Tree to work, but I need a little help and the
docs have nothing for me.
Say, I have a table that just has rows with id, id_parent, and name.
I've been using this code to load it in a Tree, but I'm not getting what
I want. I don't have an actual node with id = 0.
$options = array(
'order' => 'short_name',
'table' => 'resource_keyword_cats',
'whereAddOn' => 'id_parent = 0',
'columnNameMaps' =>
array('parentId' => 'id_parent')
);
$tree = Tree::setup('Memory_DBnested', $dbDsn, $options);
$tree->setup();
$tree->varDump();
And I get the list of the top nodes, but none of their children.
--
Rob Roy Barreca
________________________________________
__________
Electronic Insight ..... a web development company
Email .................. rob@electronicinsight.com
Website ................ www.electronicinsight.com
|