Welcome Guest, Not a member yet? Register   Sign In
sub-categories and sub-subcategories on a associative array with CI
#13

[eluser]jedd[/eluser]
[quote author="markup2go" date="1252621713"]
Yes, I mean unlimited levels of subcategories.
[/quote]

Ahh .. potentially very dangerous stuff. Did you check out MPTT as an option here?

How and where do you prevent loops in your references? If you don't, then you'll need to cater for them at extraction time.

It's a bit dodgy, but if you have an idea of the actual quantity (and sanity) of your data, as it'll be presented, it might affect the algorithms you choose to use in your model. Do you have such an idea?

If you need to have all descendent elements returned, then you'll want some recursive function - my preference is to do that in PHP. If you're happy to just take an arbitrary number of levels deep, then life becomes Much Easier.


Messages In This Thread
sub-categories and sub-subcategories on a associative array with CI - by El Forum - 09-10-2009, 12:17 PM



Theme © iAndrew 2016 - Forum software by © MyBB