Norsk.Firefox Posted October 12, 2008 Share Posted October 12, 2008 Hello; I have to three databases; one for groups; one for users; and one for users-groups-relation (relation) The relation database has three fields; id, user_id, and groups.. I save group_id's like "1, 2, 3, 4" etc. Is there any way to use the IN function to get the groups which id's is in the relation.groups field.? Quote Link to comment Share on other sites More sharing options...
DarkWater Posted October 12, 2008 Share Posted October 12, 2008 You shouldn't store IDs in a comma separated field ever. You should create a separate table which relates the two other tables and requires a simple JOIN to get to work smoothly. Read up on 'database normalization' to see what I mean. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.