How my system works is that a user may be assigned to several things.
A column is called group
and they may be assigned to several groups, e.g 1
,5
,8
etc... Is there a way to store them in the same column?
How my system works is that a user may be assigned to several things.
A column is called group
and they may be assigned to several groups, e.g 1
,5
,8
etc... Is there a way to store them in the same column?
Don't store relations in single column. Normalize your data and introduce new table which will hold references for user group relations like
Table user_groups
user_id group_id
1 1
1 5
1 8
Also have a look at Is storing a delimited list in a database column really that bad?