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.? Link to comment https://forums.phpfreaks.com/topic/128099-solved-use-of-in-to-relate/ 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. Link to comment https://forums.phpfreaks.com/topic/128099-solved-use-of-in-to-relate/#findComment-663472 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.