Hi all, I'm writing a little Content Management System (CMS) and I'm stumped on the best way to represent the navigation in the database. I have it in XML and that works fine, but I'd like to move it into the database. I figured you would all have database expertise too, but let me know if there is a better forum for this question.
The navigation can be up to 5 tiers deep, but other than that there is nothing predictable. Each item has an ID number (used by the CMS), name (what the link says in the navigation), and URL (where it goes).
I started out with a table holding the above information, in addition to the ID of the parent. That seemed fine until I started working with it. What's the easiest way to pull this information into an array so I can have the hierarchy of navigation?
Any pointers are appreciated -- especially if you've done this before and you've hit your own issues. Thanks!
The navigation can be up to 5 tiers deep, but other than that there is nothing predictable. Each item has an ID number (used by the CMS), name (what the link says in the navigation), and URL (where it goes).
I started out with a table holding the above information, in addition to the ID of the parent. That seemed fine until I started working with it. What's the easiest way to pull this information into an array so I can have the hierarchy of navigation?
Any pointers are appreciated -- especially if you've done this before and you've hit your own issues. Thanks!