At 20:03 30-03-2004, you wrote:

I did a similar system for my CMS sollution. If I understand you
correct you want to sort the main branch, keeping the subs.

Not really ... I want to be able to expand the current sub to the current sub's level, list the subfolders contained within the current sub, and have it not expand any other subs of the root... and then still list the entire root folder structure before and after ... my main problem is really finding an easy way to locate the root folder to start branching, with using as few queries as possible ...

The sorting is really completely irrelevant in this connection, it's more a matter of locating the right branches to expand...

I've not looked at it since I did the first test ... been busy with other things ... but was considering doing a series of reverse recursive SQL pulls, where I start with the requested folder's ID, put that in an array, then find the parent of that folder, put that into the same array, find the parent of that folder, put that ID into the array, and keep doing that till I reach the root folder. Then load the root folders and print them out till I reach the root folder in the array, and then start branching out from there, listing the contents of the subfolders, and branching out the ones in the array...

The reason I don't like to keep the level of the folder in the database is that I want to be able to move any and all folders around across levels in the database ... and keep their subfolders attached ...

Sofar I'm a bit blank in regards to this .... especially because I'm doing it to figure out how to do it, but don't really have anything specific I want to use it for yet, that requires more than 2 level of folders...


Rene Brehmer
aka Metalbunny

~ If you don't like what I have to say ... don't read it ~
References, tools, and other useful stuff...
Check out the new Metalbunny forums @

PHP Database Mailing List (
To unsubscribe, visit:

Reply via email to