Welcome Guest, Not a member yet? Register   Sign In
Menu Model
#12

[eluser]jedd[/eluser]
Quote:I thought my schema was relational and OK ...

It was relational, but not good - like a drunk uncle at Christmas.

The nested set article is interesting - I've not seen it explained that well before. As Fuzzy pointed out there's at least one module you can easily plug in to your CI app.

Though for what you're doing, I'd suggest you don't need anything that complicated. The standard 3-column table will do you quite nicely. You're talking about less than a KB of data .. so you'll probably get worse performance if you wrap too much stuff around it anyway. You would probably get better performance by pulling the whole table in with one SELECT query and massaging it in within PHP into a multi-dimensional array.

It might cheer you up to know that I'm trying to work out how to deal with a 23-level hierarchy, with duplicate names in the lower levels, lots of gaps all the way up the hierarchy, and requiring some way of recording child nodes that have (historically) multiple parents. Yes. I thought it would.


Messages In This Thread
Menu Model - by El Forum - 03-12-2009, 07:00 AM
Menu Model - by El Forum - 03-12-2009, 07:29 AM
Menu Model - by El Forum - 03-12-2009, 07:42 AM
Menu Model - by El Forum - 03-12-2009, 07:48 AM
Menu Model - by El Forum - 03-12-2009, 08:01 AM
Menu Model - by El Forum - 03-12-2009, 08:07 AM
Menu Model - by El Forum - 03-12-2009, 08:35 AM
Menu Model - by El Forum - 03-12-2009, 08:40 AM
Menu Model - by El Forum - 03-12-2009, 08:48 AM
Menu Model - by El Forum - 03-12-2009, 08:49 AM
Menu Model - by El Forum - 03-12-2009, 09:34 AM
Menu Model - by El Forum - 03-12-2009, 09:51 AM
Menu Model - by El Forum - 03-12-2009, 10:02 AM



Theme © iAndrew 2016 - Forum software by © MyBB