I have a simple form that allows users to select an option from a select menu and then save it in the database. I need to store the full name so that views can use it. So the table in my database might look like this:
nid | uid | type
------------------
1 | 2 | 0
2 | 2 | 3
1 | 3 | 5
3 | 1 | 4
and so on... I was thinking of doing a basic one to many relationship table like:
tid | name
----------
0 | random name 1
1 | random name 2
2 | random name 3
3 | random name 4
but I only have 6-7 types at the most, so I'm not sure if that is efficient. Maybe simply storing the full name instead of an ID would be better in that case? Another way might be to use variable_get, but then I also need the custom field module that allows php code in views. Any better way to do it in drupal? Thanks.