Have you considered using the tree-behaviour for this? http://book.cakephp.org/view/1339/Tree
Another way would be to find your root element with its children and for each child look for its sub-children recursively. On 21 Mai, 15:40, Matthias <[email protected]> wrote: > Hi, > I have a commenting system where each comment can be commented by any > number of reply comments, which themselves can be commented, and so > on. So I use the parent_id field and find('threaded') works great. But > it always returns all entries. Now I want to use this behaviour with a > given comment as the root. I've tried something with find(all) and > recursive, but I have to specify the root with something like > 'conditions' => array('Comment.id' => $id), and this always returns > only the 1 comment. > Any ideas how to do this with the query? -- Our newest site for the community: CakePHP Video Tutorials http://tv.cakephp.org Check out the new CakePHP Questions site http://ask.cakephp.org and help others with their CakePHP related questions. To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/cake-php
