Hi,
I am building a site which will allow users to become members of several different groups for certain activities. I had hoped to set my Postgres tables up thusly --
groups
gid serial
gmembers integer[]
etc, etc
users
uid serial
uname varchar
etc, etc
-- and then use a one-dimensional PG array to store all the userids who are members of that group in a gmembers array. Saddened to find that PHP will only treat these PG arrays as strings, which makes addition and removal (particularly removal) of members from groups pretty complex to my novice eye, I am wondering if this is the best way to do things.
I must admit that this is more complex than what I have used PHP for in the past and am probably missing something painfully simple. I am sure this question comes up frequently, but I wasn't able to find anything relevent in the archives... any help is appreciated.
Thanks,
IO
Another PGSQL array question.
Moderator: General Moderators
Uh, is this a solution.
Hi again,
I've done more digging and found this (viewtopic.php?t=2455) which appears to be close to my scenario.
Is this a better idea than mine?
I've done more digging and found this (viewtopic.php?t=2455) which appears to be close to my scenario.
Is this a better idea than mine?