![]() |
MPTtree, Hieararchical trees in a database table - Printable Version +- CodeIgniter Forums (https://forum.codeigniter.com) +-- Forum: Archived Discussions (https://forum.codeigniter.com/forumdisplay.php?fid=20) +--- Forum: Archived Libraries & Helpers (https://forum.codeigniter.com/forumdisplay.php?fid=22) +--- Thread: MPTtree, Hieararchical trees in a database table (/showthread.php?tid=6842) |
MPTtree, Hieararchical trees in a database table - El Forum - 04-13-2009 [eluser]CtheB[/eluser] Oke thank you, i will do that when i have time for it. And then i'll post the results here. MPTtree, Hieararchical trees in a database table - El Forum - 04-13-2009 [eluser]TheFuzzy0ne[/eluser] Martin, did you see my comments above? http://ellislab.com/forums/viewreply/562453/ I was also wondering if you had plans to rename hasChildren to has_children for consistency. Thanks. MPTtree, Hieararchical trees in a database table - El Forum - 04-14-2009 [eluser]m4rw3r[/eluser] I think it is complete, I cannot create the menu generating code without creating something which less than half will use. But next time I release a new version - hopefully not too far in the future - I will provide an example menu + admin or something similar. And I definitely plan to rename hasChildren() to has_children(), I have to claim I was young and stupid (also, I coded PERL before I started with PHP ![]() MPTtree, Hieararchical trees in a database table - El Forum - 04-22-2009 [eluser]Andreas Krohn[/eluser] I want to use MPTtree via the IgnitedRecord behaviour "tree". Currently I am using MPTtree 0.1.6-fix2, but I am having problems. For example children() and descendants() does not work. I suspect that a version missmatch is causing these problems as well as the problems I reported in this thread. Is there any specific version of MPTtree I need to use with the latest IgnitedRecord (downloaded from svn)? MPTtree, Hieararchical trees in a database table - El Forum - 04-22-2009 [eluser]m4rw3r[/eluser] It is nothing (well, in this case - I can see many things that can be better with MPTtree) wrong with MPTtree. It is the tree behaviour that isn't updated to the new IgnitedRecord architecture. I figured I should rewrite the tree behavour when I started to rewrite MPTtree - which I quickly abandoned, because IR demanded more attention. Hopefully I can do a rewrite of MPTree when I'm finished with my new database abstraction (which is something I also do to get good grades). MPTtree, Hieararchical trees in a database table - El Forum - 04-22-2009 [eluser]Andreas Krohn[/eluser] Thanks for your quick answer (as well as a great library!). So if I want to use MPTtree I should just use it as a seperate thing and not via the IgnitedRecord behaviour? MPTtree, Hieararchical trees in a database table - El Forum - 04-22-2009 [eluser]m4rw3r[/eluser] Ok, I think I found the problem: the dbobj2orm() method converts only DB_result ![]() So to fix that a little update to base_php5.php (or base.php) is required: Code: // in base_php5.php MPTtree, Hieararchical trees in a database table - El Forum - 04-28-2009 [eluser]TheFuzzy0ne[/eluser] Hi, Martin. I'm looking at the insert_node() method, and whilst I understand it's meant primarily for internal use, it looks like if I make a typo when I am supplying the data, I'll end up with a gap in my tree. Is that correct? I was wondering whether it might be better to run those two update queries after the data has been inserted successfully. What do you think? If you did this, you'd have to expand on the two update queries, so that they ignore the newly inserted row. MPTtree, Hieararchical trees in a database table - El Forum - 05-01-2009 [eluser]sshz[/eluser] I have ~700 nodes tree and mysql request for get_children for my root node is about 7 seconds, is this normal? I need to get first level children for ~6000 nodes tree, with fast(less then one second) request, is it possible? MPTtree, Hieararchical trees in a database table - El Forum - 05-02-2009 [eluser]TheFuzzy0ne[/eluser] I don't see why not. Are you sure you've indexed the tables correctly? |