MySQL dilemma - Appending and Deleting certain data from one column So I in my infinite free time decided to practice PHP prog by making a
groups database, where members can join groups, etc, much like Google
groups
here is my dilemma: how to handle the associations between users and
groups
here is how I have it set up:
One table users one for groups
Groups table has a column (TEXT format) named members
in this members column there is a text file that contains all the
members that belong to that group, the members are separated by ";" for
parsing
so it looks like: "john;cat;mavis;adam;snoop
dogg;peter;kevin;steve;bob"
is there a way to remove one element from this array (list)? with a
mysql command?
let's say I want to remove "mavis"
how would I go about doing this?
I figured that if I used "UPDATE" then it will do a block update, this
could take long with thousands of members
I also figured that a cheat way to doing this, with using more
resources, would be to create a table for each group with each user
being a separate row.
with hundreds of groups, would this be possible? |