ok,
this is my first time ever doing anything with server-side stuff.
the navigation for the site is divided into 5 main categories which have sub-links in them. Clicking on the main category will display the sub-links. the idea is to display teh current category and sub-category in a different color. I could potentially acomplish this with javascript, buti think that in this situation, having it come from a db will be a better approach.
so my idea was that each link will carry some parameters with it and then i will perform a check and say
or something like that.Code:if ((category == passed category) && (sub-link = passed sub-link)) { display in red } else { display in blue }
so how do you think i should be organizing this?
1. each main category is its own table, with sub-links as rows
2. everything is in 1 table and each row will have the sub-link and the main category it belongs to (but then i'd still have to have a separate table to hold all of the main categorie, right?)
3. some other better solution.
could you please tell me what the advantages/drawbacks of each solution are? this is the first time i'm trying to "design" a db, so i have no clue.
thanks!





Bookmarks