RE: [PEAR-DEV] Pear::Tree - Questions and feature requests

From: Date: Mon, 21 Jul 2003 08:41:52 +0000
Subject: RE: [PEAR-DEV] Pear::Tree - Questions and feature requests
References: 1  Groups: php.pear.dev 
Request: Send a blank email to pear-dev+get-18478@lists.php.net to get a copy of this message
> >>> 1. getNestedTreeArray($root) method - producing a nested array of > >>> elements based on parent l and r for positioning. (is > this possible > >>> already? > >> > >> have you tried with function getAllChildren()? > >> > > This does not produce a nested or multidimensinoal array. I mean > > children should be in an array of their parent, and so on. > > mmm... I thought I had seen something like that, > but I can't find it right now. Maybe I just imagined it. > You should be able to implement it from getElement(), > though... I think it's possible in the other DENestedSet package in Pear. Any suggestions on implementation would be appreciated. > > > >>> 3. selectAddon - whereAddon allows SQL after > >>> the WHERE, select could be in the select? > >>> > >> do you mean subselects? They *should* be possible, but of > course the > >> db backend must support them. > >> > > Not subselects, but the ability to add arbitry columns to > the select > > side of the query rather than just selecting all...maybe > this can be > > done already then? > > ah, I see... no, AFAIK it shouldn't be possible yet. > Something for the TODO list, I guess? Yes, hopefully of reasonable priority as currently all the SELECT statements do SELECT *. This is not good if there are additional columns in the DB Table. Perhaps the select should be more like $query = 'SELECT ' . $idCol . ', ' . $leftCol . ', ' . $rightCol . ', ' . $parentCol . ', ' . $selectAddOn . ' WHERE .... ' . $whereAddOn . ' LIMIT ' . $limitAddOn; Or something. What do you think? > > Lorenzo -- Simon H

« previous php.pear.dev (#18478) next »