Re: generatetreelist; similar function for retrieving depth

2010-07-30 Thread Tomatosoup
Yes, that would work too. Thanks :) (for some reason this message didn't get posted earlier) On 30 jul, 13:55, Jon Bennett wrote: > you could use getpath, eg: > > count($this->Model->getpath($id, array('id'))); > > hth > > Jon Check out the new CakePHP Questions site http://cakeqs.org and help

Re: generatetreelist; similar function for retrieving depth

2010-07-30 Thread Tomatosoup
Yes, that would work too. Thanks :) On 30 jul, 13:55, Jon Bennett wrote: > you could use getpath, eg: > > count($this->Model->getpath($id, array('id'))); > > hth > > Jon > > On 30 July 2010 12:45, Tomatosoup wrote: > > > > > > > Hello, > > > Does anybody know of a function likegeneratetreelistth

Re: generatetreelist; similar function for retrieving depth

2010-07-30 Thread Tomatosoup
Thanks :) I'll look into that. On 30 jul, 14:28, cricket wrote: > On Fri, Jul 30, 2010 at 7:45 AM, Tomatosoup > wrote: > > Hello, > > > Does anybody know of a function likegeneratetreelistthat seperates > > the depth from the value. Instead of counting the spacer chars. > > > I saw an SQL quer

Re: generatetreelist; similar function for retrieving depth

2010-07-30 Thread cricket
On Fri, Jul 30, 2010 at 7:45 AM, Tomatosoup wrote: > Hello, > > Does anybody know of a function like generatetreelist that seperates > the depth from the value. Instead of counting the spacer chars. > > I saw an SQL query in the explanation page of MySQL. > It's this page: > http://dev.mysql.com/

Re: generatetreelist; similar function for retrieving depth

2010-07-30 Thread Jon Bennett
you could use getpath, eg: count($this->Model->getpath($id, array('id'))); hth Jon On 30 July 2010 12:45, Tomatosoup wrote: > Hello, > > Does anybody know of a function like generatetreelist that seperates > the depth from the value. Instead of counting the spacer chars. > > I saw an SQL query

generatetreelist; similar function for retrieving depth

2010-07-30 Thread Tomatosoup
Hello, Does anybody know of a function like generatetreelist that seperates the depth from the value. Instead of counting the spacer chars. I saw an SQL query in the explanation page of MySQL. It's this page: http://dev.mysql.com/tech-resources/articles/hierarchical-data.html This is the query: