countdrac Posted November 19, 2007 Share Posted November 19, 2007 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 Quote Link to comment https://forums.phpfreaks.com/topic/77919-hardcode-or-db/ Share on other sites More sharing options...
nuxy Posted November 19, 2007 Share Posted November 19, 2007 For only five rows I would suggest using it without a database. It would be much more efficient to place the data in the script rather than using a database. Quote Link to comment https://forums.phpfreaks.com/topic/77919-hardcode-or-db/#findComment-394395 Share on other sites More sharing options...
dbo Posted November 19, 2007 Share Posted November 19, 2007 It depends. Is this for yourself or a client? Is the list expected to grow? Who will make updates in the future... etc etc. Quote Link to comment https://forums.phpfreaks.com/topic/77919-hardcode-or-db/#findComment-394425 Share on other sites More sharing options...
Evan69 Posted November 22, 2007 Share Posted November 22, 2007 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. Quote Link to comment https://forums.phpfreaks.com/topic/77919-hardcode-or-db/#findComment-396644 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.