Jump to content

hardcode or DB


countdrac

Recommended Posts

this is my table:

 

name

id

description

topic

year

category

 

so now i want to know - i only have around 5 categories so is it worth me have a seperate table for it?

 

this is for a website which i populate a dropdown box with the categories...

 

i just want to know as a design aspect if its better to just hardcode the categories into the html or populate them from the DB (ie making a table for them and getting them from there)?

 

thanks

Link to comment
https://forums.phpfreaks.com/topic/77919-hardcode-or-db/
Share on other sites

I would just make another table for catagories. Its not much harder than implementing the catagories in the scripter and makes the script much much more flexible, unless you are 100% certain the catagories will never chance, even though i would still use another table in that case.

Link to comment
https://forums.phpfreaks.com/topic/77919-hardcode-or-db/#findComment-396644
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.