Welcome Guest, Not a member yet? Register   Sign In
MPTtree Model: Database Error
#6

[eluser]m4rw3r[/eluser]
If you want to have a depth column, use the get_descendants() method. As of 0.1.6 it has got a third argument, $with_level_col (default = false), that if set to true makes get_descendants() return a multidimensional array with table data with a depth column.

So it seems like get_descendants() performs exactly what you want, the only thing I can see you have to change is the 'Depth' to 'depth' to use the view with get_descendants() :-).


Messages In This Thread
MPTtree Model: Database Error - by El Forum - 03-23-2008, 10:04 PM
MPTtree Model: Database Error - by El Forum - 03-24-2008, 06:12 AM
MPTtree Model: Database Error - by El Forum - 03-24-2008, 10:28 AM
MPTtree Model: Database Error - by El Forum - 03-24-2008, 10:40 AM
MPTtree Model: Database Error - by El Forum - 03-24-2008, 11:45 AM
MPTtree Model: Database Error - by El Forum - 03-24-2008, 12:31 PM
MPTtree Model: Database Error - by El Forum - 03-24-2008, 06:20 PM
MPTtree Model: Database Error - by El Forum - 03-25-2008, 04:39 AM



Theme © iAndrew 2016 - Forum software by © MyBB