Hey all,
Quick question. My site has a standard layout with a header, footer, and sidebar. The sidebar has all the product category links (20 or so). Then when a user clicks any of these category links, it brings up my viewcategory.php page which pulls all the subcategories, for that specific category, from the database. So this page is dynamic. However, the sidebar set of links, which appears on EVERY page, is static. I originally thought it would be overkill to have the database access the "category" table each and every time a new page was loaded. So as of now, if i were to add new products to my database such that they warranted a new category, i would just go edit the static code and throw in the line for the new category.
So my question for you all is what do you feel is the standard practice here. My guess is that ppl take advantage of databases in all way possible and like to do the coding one time and then not worry about it. My guess is that most of you would have made that sidebar dynamic and constantly pull the data from the database.?.
It's just a pain to try to keep track of which categories should be there or adding categories. But on the flipside, although sql is fast, i thought it was overkill to have it pull this sidebar set of categories (links) from the db each time a new page was loaded. Your thoughts?
Please advise.
Jonathan