G
Green Biro
I have a many-to-many relationship in that any persons can have any roles.
I know that the correct way of doing this is to create a child table that
simply links the person_id and role_id together.
My problem is that (at the moment at least) the number of roles is limited
to ten and I would like a form that simply displays names and ten check
boxes - one for each role - that a user can tick as required against each
person.
In order to achieve the above, I have actually hard coded my roles as
columns in a person_roles table. Inevitably, that is making things a bit
difficult further down the line so I am thinking of redesigning and doing it
the proper way (ie child table per first paragraph) but what tequniques can
I use to create my form when the tables are designed in this way?
Thanks in anticipation of some guidance.
GB
I know that the correct way of doing this is to create a child table that
simply links the person_id and role_id together.
My problem is that (at the moment at least) the number of roles is limited
to ten and I would like a form that simply displays names and ten check
boxes - one for each role - that a user can tick as required against each
person.
In order to achieve the above, I have actually hard coded my roles as
columns in a person_roles table. Inevitably, that is making things a bit
difficult further down the line so I am thinking of redesigning and doing it
the proper way (ie child table per first paragraph) but what tequniques can
I use to create my form when the tables are designed in this way?
Thanks in anticipation of some guidance.
GB