#1
  1. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Apr 2011
    Posts
    18
    Rep Power
    0

    Assign users to multiple groups


    I have a table of users and a table of relatives, currently a user can only be assigned to one relative, with that relatives id being stored in the user table under the column name relativeid.

    I want to be able to assign multiple relatives to a single user but im not sure how i would achieve this. I could add a second relativeid column for the users, with null values if no second relative exists but (although unlikely in this system) there could potentially be 3 maybe 4 relatives. I thought their must be a more efficient way of doing this?
  2. #2
  3. --
    Devshed Expert (3500 - 3999 posts)

    Join Date
    Jul 2012
    Posts
    3,957
    Rep Power
    1045
    The 6 worst sins of security ē How to (properly) access a MySQL database with PHP

    Why canít I use certain words like "drop" as part of my Security Question answers?
    There are certain words used by hackers to try to gain access to systems and manipulate data; therefore, the following words are restricted: "select," "delete," "update," "insert," "drop" and "null".
  4. #3
  5. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Apr 2011
    Posts
    18
    Rep Power
    0
    Thanks i will look into this.

IMN logo majestic logo threadwatch logo seochat tools logo