• 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Drop down menus and lookup tables?

#1
[eluser]jleequeen[/eluser]
I'm trying to decide whether to hard code some drop down menus or use lookup tables. I'm the kind of person that would much rather use real data in fields as opposed to a generic id that relates to another table where they make sense. For instance, if I need a drop down list of counties in my state, and these will never change, then I'd rather see the county name in a county field within a table, than a county_id...that doesn't really mean anything. I realize you sacrifice a little speed by using the text, but it's worth it to me because the complexity of joins is removed. Also, there are the little dropdown list that you only need say 5 values. Obviously you don't need a lookup table in you db to represent this small dropdown.

What I am trying to decide is if I implement this hardcoding of certain drop down menus, what is the best approach in CI. Obviously I don't want to duplicate hardcoding of a data array every time in a controller to pass to the form_dropdown helper. Is there a best place to put predefined array lists to use globally throughout your application?


Messages In This Thread
Drop down menus and lookup tables? - by El Forum - 08-19-2008, 08:41 AM
Drop down menus and lookup tables? - by El Forum - 08-19-2008, 09:36 AM
Drop down menus and lookup tables? - by El Forum - 08-19-2008, 11:04 AM

Digg   Delicious   Reddit   Facebook   Twitter   StumbleUpon  


  Theme © 2014 iAndrew  
Powered By MyBB, © 2002-2020 MyBB Group.