More recursive madness |
[eluser]skunkbad[/eluser]
[quote author="Mischievous" date="1271830145"]I would need to see your db setup but I have a couple functions that do this. That allow an unlimited amount of levels using 1 db request.[/quote] The DB is like this: http://bitbucket.org/skunkbad/community-...y_cart.sql Currently, the constructor brings in all category table data and creates a result array. That array is used by a a lot of the methods, so I need to use that array to build the menu. There is a recursive function in the category_menu view that takes what the make_category_menu() method passes to it and creates the menu. Maybe there is a more direct way, or a more simple way. Like I said earlier, it does work, but if there was some optimization or simplification, everyone that uses the application would benefit. |
Messages In This Thread |
More recursive madness - by El Forum - 04-20-2010, 06:11 PM
More recursive madness - by El Forum - 04-20-2010, 07:06 PM
More recursive madness - by El Forum - 04-20-2010, 07:09 PM
More recursive madness - by El Forum - 04-20-2010, 08:55 PM
More recursive madness - by El Forum - 04-21-2010, 03:06 AM
More recursive madness - by El Forum - 04-21-2010, 09:11 AM
More recursive madness - by El Forum - 04-21-2010, 02:05 PM
|